Skip to content

feat: upgrade to @metanames/sdk 7.0.0 - #1

Merged
yeboster merged 5 commits into
mainfrom
dev/sdk-v7
Aug 30, 2026
Merged

feat: upgrade to @metanames/sdk 7.0.0#1
yeboster merged 5 commits into
mainfrom
dev/sdk-v7

Conversation

@yeboster

Copy link
Copy Markdown
Contributor

Upgrades the app to @metanames/sdk@7.0.0 and fixes what the upgrade uncovered.

Changes

  • Depend on 7.0.0. v7 loads its signing backends on demand, so the crypto stack no longer reaches pages that only read contract state.
  • Import the SDK's named subpaths. Nine sites reached into @metanames/sdk/dist/..., the package's CJS build tree. v7 exports models/domain, providers/config, interface and transactions/ledger directly and no longer maps dist, so those imports would have failed to resolve.
  • Fix MetaMask connection. connectMetaMask read window.isMetaMask off the window itself, which no extension sets, so every attempt threw MetaMask not found. It now reads window.ethereum, searches providers[] when several wallets share the slot, hands the real provider to setSigningStrategy, and accepts the snap's bare-string get_address reply. The old test installed the same wrong shape on window, so it passed against the bug; it now installs a provider, plus cases for flag-on-window, multi-provider discovery, and the string address.
  • npm run sdk:local packs and installs a sibling SDK checkout, for testing an unreleased SDK against this app.

Verification

  • tsc --noEmit clean
  • 769 unit tests pass
  • next build green
  • Playwright against testnet: 162 passed, 3 flaky (pass on retry), 1 skipped
  • Manual on the preview: registration signed with MetaMask snap and with the Partisia wallet extension. Ledger not yet exercised.

Known failures, not from this branch

a11y.spec.ts reports axe color-contrast violations on /profile and /renew. Present before this upgrade, tracked separately.

https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb

Testing an unreleased SDK against this app needed a manual pack-and-install
every time, and npm caches a tarball by name and version -- a rebuilt
7.0.0 installs as the previous 7.0.0 unless the file name changes, which is
silent and cost a debugging round while verifying v7.

`npm run sdk:local [path]` builds the sibling checkout, packs it under a
timestamped name and installs that. A tarball rather than `file:../sdk` or
`npm link`: a symlinked working tree lets the app resolve files the published
package does not ship and makes `next build` follow the SDK's own node_modules,
which is not what a release candidate should be tested against.

package.json keeps pointing at the published version; the script overwrites the
dependency locally and prints how to restore it.
`npm run sdk:local` packs into `.local-sdk/`, which is gitignored: a
Vercel preview cloning this branch has no tarball to install. v7 is not
published yet, so the candidate is committed under `vendor/` and the
dependency points at it. Revert to the published version before merging.

Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
`@metanames/sdk/dist/...` reached into the package's CJS tree, which the
SDK is free to rearrange. v7 exports these four directly and drops the
dist paths from its exports map.

Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
`connectMetaMask` cast `window` itself to the provider and checked
`window.isMetaMask`, which no extension ever sets, so every attempt threw
"MetaMask not found" and the provider handed to `setSigningStrategy` had
no `request` method either. The test installed the same globals on
`window`, so it passed against the broken shape.

Providers inject on `window.ethereum`, and when several wallets are
installed the last to load owns that slot and lists the rest under
`providers`. The snap also answers `get_address` with the address itself
rather than an object, which the caller rejected as missing.

Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
The vendored candidate existed only so Vercel previews could build before
v7 was on npm. 7.0.0 is published, so the dependency points at the
registry and the tarball is gone.

Claude-Session: https://claude.ai/code/session_01GceWCwGXu66D1xEBDxZWBb
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app-react Ready Ready Preview Aug 30, 2026 10:47am
app-react-new Ready Ready Preview Aug 30, 2026 10:47am

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.

1 participant