Conversation
- Bump @crossmint/client-sdk-react-ui from 2.6.16 to ^4.0.1 - Rename createOnLogin.signer to createOnLogin.recovery - Replace useAuth with useCrossmintAuth across all components - Replace wallet.experimental_activity() with wallet.transfers() - Map new transfers response shape (sender/recipient/token) to ActivityEvent - Remove showPasskeyHelpers prop (handled by SDK in v1) Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
Original prompt from Jonathan
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
V1 SDK requires explicit signers config unlike the old SDK which set up
device signers automatically. Without this, the SDK constructs an empty
device locator ('device:' with no key), causing 400 errors on signer
state lookups and 'already approved' errors during recovery.
Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
The playground reference confirms createOnLogin does NOT include explicit signers config. The SDK auto-initializes device signers via IframeDeviceSignerKeyStorage. The empty device locator issue is an SDK-level problem, not a missing config. Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
activity updates
package.json
Outdated
| }, | ||
| "dependencies": { | ||
| "@crossmint/client-sdk-react-ui": "2.6.16", | ||
| "@crossmint/client-sdk-react-ui": "^4.0.1", |
There was a problem hiding this comment.
@devinai please bump this to latest 4.0.6
There was a problem hiding this comment.
Bumped to 4.0.6 (pinned, no caret). Lockfile updated.
Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
Co-Authored-By: Jonathan Derbyshire <jonathan.temp@paella.dev>
Summary
Migrates
@crossmint/client-sdk-react-uifrom2.6.16to4.0.6(Wallets V1 SDK). Changes are scoped to breaking API renames — no refactoring of unrelated code.What changed:
useAuth→useCrossmintAuth(8 files)createOnLogin.signer→createOnLogin.recoveryin provider setupwallet.experimental_activity()→wallet.transfers()with response shape mapping (data.events→data.data, fields remapped toActivityEvent)showPasskeyHelpersprop (assumed handled by SDK in v1)Updates since last revision
4.0.6: Pinned@crossmint/client-sdk-react-uito exact version4.0.6(was^4.0.1). Updatedpnpm-lock.yamlaccordingly.package-lock.json: A freshly-generated npm lockfile was committed by mistake (repo uses pnpm). This caused a Vercel deployment failure. Removed in a follow-up commit.Previous updates (for context)
completedAtbug in activity feed: The V1 Transfer type usescompletedAt(notcreatedAt). The original mapping usedtx.createdAtwhich resolved toundefined, producingNaNtimestamps — breaking date display and sort order in the activity feed. Fixed inhooks/useActivityFeed.ts.tokensparam intransfers()call: Thetransfers()method was being called without parameters. Now passes{ tokens: "usdc", status: "successful" }to correctly filter activity results, matching the pattern used in the playground reference snippets.signersconfig: An earlier commit addedsigners: [{ type: "device" }]tocreateOnLogin, but the playground reference confirms device signers auto-initialize via the provider'sIframeDeviceSignerKeyStorage— no explicit config needed. Reverted.Known SDK issue (not fixable in app code)
Yield deposits are broken by an SDK-level device signer bug. When
evmWallet.sendTransaction()callspreAuthIfNeeded()→recover(), the SDK'sresolveDeviceSignerAvailabilitysometimes produces an empty device locator (device:with no public key), causing:GET .../signers/device:→ 400 "Invalid public key base64"recover()tries to re-register → fails with "already approved"This is internal to
@crossmint/wallets-sdk'srecover()method and cannot be worked around in app code.Review & Testing Checklist for Human
(tx: any)(line 50 ofuseActivityFeed.ts), so TypeScript cannot validate field names at compile time. ThecreatedAtbug was caught this way; other fields (tx.sender?.address,tx.recipient?.address,tx.token?.amount,tx.token?.symbol) remain unverified against live API responses.transfers({ tokens: "usdc" })returns the expected data: Thetokensparam is hardcoded to"usdc". If the app supports other tokens in the future, this filter will silently exclude them from the activity feed."cancel"and"fail"substrings inevent.type. V1 transfer types are"wallets.transfer.in"/"wallets.transfer.out"— so canceled/failed transfers will render as regular "Sent"/"Deposit" with no visual distinction. Decide if this is acceptable or needs a follow-up using thestatus: "failed"field.showPasskeyHelpersremoval is safe: The old code hadshowPasskeyHelpers={chain !== "solana"}. Deploy withNEXT_PUBLIC_CHAIN_ID=solanaand confirm no broken passkey prompts appear.device:/ "already approved" errors described above. This validates the issue is SDK-level (not a missing app-side fix) and can be escalated to the SDK team.Recommended test plan: Deploy to staging, log in, deposit USDC, send a transfer, and confirm the activity feed. Then attempt a yield deposit — expect it to fail with the SDK device signer error described above until the SDK is patched.
Notes
NEXT_PUBLIC_CROSSMINT_CLIENT_API_KEYmissing during static page generation (expected without.env).globals.cssandPositionsList.tsxwere not touched.anycast on the transfers mapping is a pragmatic tradeoff — the SDK doesn't export a named type for individual transfer items that's easy to import. This was the root cause of thecreatedAtbug and remains a risk for other fields.4.0.6(no caret) per reviewer request.Link to Devin session: https://crossmint.devinenterprise.com/sessions/801a63c1d8ab4cf29f9b2c26251758ba
Requested by: @jmderby