fix: reject device signers for Solana wallets with contact sales message#1720
fix: reject device signers for Solana wallets with contact sales message#1720albertoelias-crossmint wants to merge 2 commits intowallets-v1from
Conversation
Device signers are not currently supported for Solana wallets. Instead of letting the request hit the API and fail with a 500, throw an InvalidSignerError client-side with a contact sales message. WAL-9474 Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Co-Authored-By: Alberto Elias <alberto.elias@paella.dev>
Original prompt from Alberto Elias
|
🤖 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:
|
🦋 Changeset detectedLatest commit: f7ccb3d The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Last reviewed commit: "chore: add changeset..." |
🔥 Smoke Test Results✅ Status: Passed Statistics
✅ All smoke tests passed!All critical flows are working correctly. This is a non-blocking smoke test. Full regression tests run separately. |
Description
Fixes WAL-9474. Device signers (P256-based) are not currently supported for Solana wallets. Previously, attempting to register one would hit the server and return a 500. This PR adds client-side guards that reject device signers early with a clear
InvalidSignerErrorincluding a contact sales link.Two entry points are guarded:
Wallet.addSigner— rejects device signers whenthis.chain === "solana"WalletFactory.registerSigners— rejects device signers whenchain === "solana"during wallet creationItems for reviewer:
wallet.tsusesthis.chain === "solana"for the check. The class has aisSolanaWallet()helper — verify whether that should be used instead for consistency.InvalidSignerErroris already in scope inwallet.ts(no import was added in the diff).Test plan
pnpm lint)pnpm test:vitest)Package updates
@crossmint/wallets-sdk: patch (changeset added via.changeset/solana-device-signer-error.md)Link to Devin session: https://crossmint.devinenterprise.com/sessions/1c1845672cb94db9a8f27f85b77226d0
Requested by: @albertoelias-crossmint