Skip to content

refactor: use mvr resolution from wallet-core - #53

Merged
fcsondheim merged 4 commits into
mainfrom
mvr-walletcore
Sep 25, 2026
Merged

fcsondheim merged 4 commits into
mainfrom
mvr-walletcore

Conversation

@fcsondheim

Copy link
Copy Markdown
Collaborator

What

  • dapp-kit reads the MVR cache from @evefrontier/wallet-core (pinned to 0.0.13) instead of keeping its own copy.
  • getObjectId and getRegistryAddress build the ObjectRegistry and TenantItemId type tags with getTenantWorldType(tenant, key), instead of pasting TENANT_CONFIG[tenant].packageId into a string. Tenants not in TENANT_CONFIG still fall back to the env-driven getWorldType.
  • Removes dapp-kit's copy of the cache, the scan seeds, the gen:mvr script, @mysten/mvr-static, and the enquirer patch. Generation now happens only in wallet-core.
  • Adds docs/world-upgrade-runbook.md, which covers regenerating, publishing and pinning after a world or currency upgrade.

Why

utopia resolved to 0xd12a70c…, a stale id hard-coded in TENANT_CONFIG, while its MVR tier (@evefrontier/world-uat) points to 0x28eab6…. Regenerating the cache in dapp-kit couldn't fix this, because the tenant path never read that cache. wallet-core 0.0.13 gets tenant package ids from MVR, so both paths now use the same cache.

Package ids that change (the world-test tenants stay the same):

Tenant World EVE
utopia, umbra 0xd12a70c… → 0x28eab6… 0xf0446b… → 0x5a575a…
stillness 0x8b8a46… → 0x7be18d… 0xac361a… → 0xc66365…
liminality 0x28b497… → 0x7be18d… 0x2a66a8… → 0xc66365…

Screenshots / Gifs

n/a

Where has this been tested?

  • In-game browser
  • External browser

Copilot AI lite review requested due to automatic review settings September 25, 2026 12:19
@fcsondheim fcsondheim changed the title Mvr walletcore refactor: use mvr resolution from wallet-core Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Coverage Report for @evefrontier/dapp-kit

Status Category Percentage Covered / Total
🔵 Lines 89.16% 864 / 969
🔵 Statements 87.17% 931 / 1068
🔵 Functions 84.64% 193 / 228
🔵 Branches 74.33% 588 / 791
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/libs/dapp-kit/utils/mapping.ts 95% 92.85% 100% 94.87% 29-31
packages/libs/dapp-kit/utils/mvr/worldTypes.ts 100% 100% 100% 100%
Generated in workflow #120 for commit 23d1442 by the Vitest Coverage Report Action

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Resolve the dApp fallback and tenant configuration issues, and add the requested regression coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

This PR centralizes MVR resolution in wallet-core@0.0.13, updates tenant-aware type derivation, removes local MVR tooling, and adds an upgrade runbook.

Changes:

  • Uses wallet-core’s shared MVR cache and tenant type resolution.
  • Removes local cache, seeds, generator scripts, patch, and dependencies.
  • Updates tests, package metadata, lockfile, and assembly behavior.
  • Adds world upgrade documentation.
File Summary
patches/​@mysten%2Fmvr-static@0.4.17.patch Removes obsolete dependency patch.
packages/​libs/​dapp-kit/​utils/​mvr/​worldTypes.ts Uses wallet-core MVR resolution.
packages/​libs/​dapp-kit/​utils/​mvr/​worldTypeKeys.ts Removes local MVR seeds.
packages/​libs/​dapp-kit/​utils/​mvr/​README.md Removes obsolete local-cache documentation.
packages/​libs/​dapp-kit/​utils/​mvr/​mvrCache.generated.ts Removes generated local cache.
packages/​libs/​dapp-kit/​utils/​mapping.ts Updates tenant type resolution; configuration checks require changes.
packages/​libs/​dapp-kit/​utils/​index.ts Re-exports wallet-core type keys.
packages/​libs/​dapp-kit/​utils/​__tests__/​worldTypes.test.ts Updates shared-cache tests.
packages/​libs/​dapp-kit/​utils/​__tests__/​mapping.test.ts Updates mapping expectations; additional resolver coverage is needed.
packages/​libs/​dapp-kit/​utils/​__tests__/​constants.test.ts Updates currency package expectations.
packages/​libs/​dapp-kit/​package.json Updates wallet-core dependency and removes MVR tooling.
packages/​apps/​assembly/​src/​components/​Behaviour.tsx Updates dApp URL resolution; fallback handling requires changes.
package.json Removes MVR patch registration.
docs/​world-upgrade-runbook.md Documents the MVR upgrade workflow.
bun.lock Updates dependency resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/apps/assembly/src/components/Behaviour.tsx Outdated
@fcsondheim
fcsondheim requested a review from a team September 25, 2026 12:50

@ccp-bofai ccp-bofai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fcsondheim
fcsondheim merged commit 33e77c6 into main Sep 25, 2026
3 checks passed
@fcsondheim
fcsondheim deleted the mvr-walletcore branch September 25, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants