Wallet SDK: let useSigner resolve any recovery signer from the list - #2045
Conversation
Co-Authored-By: Panayiotis Halios <panos@paella.dev>
Original prompt from Panayiotis
|
🦋 Changeset detectedLatest commit: 898ad6a The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
🤖 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:
|
useSigner resolve any recovery signer from the listuseSigner resolve any recovery signer from the list
Prompt To Fix All With AI### Issue 1
packages/wallets/src/wallets/wallet.ts:1126
**Secondary server secrets persist**
When a secondary server recovery signer is selected, this assignment stores its complete secret-bearing configuration in `#recoverySigners`, while the subsequent `stripSecretFromRecovery()` call sanitizes only the primary recovery entry. The secret therefore remains exposed through the public `wallet.recoverySigners` getter, unnecessarily extending its lifetime and exposure surface.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(wallets): let useSigner resolve any..." | Re-trigger Greptile |
Co-Authored-By: Panayiotis Halios <panos@paella.dev>
Co-Authored-By: Panayiotis Halios <panos@paella.dev>
🔥 Smoke Test Results❌ Status: Failed Statistics
Test DetailsThis is a non-blocking smoke test. Full regression tests run separately. |
Co-Authored-By: Panayiotis Halios <panos@paella.dev>
…rbitrary-recovery-signer Co-Authored-By: Panayiotis Halios <panos@paella.dev>
Description
Follow-up to #2044.
isRecoverySigneronly compared against the primary recovery signer (#signerManager.recovery), so callingwallet.useSignerwith a secondary recovery signer from a Solana/Stellar recovery list threwSigner "..." is not registered in this wallet.— even though on-chain every recovery signer can authorize on its own.isRecoverySignernow iterateswallet.recoveryMethods:A matched secondary recovery method resolves as an admin signer (
status: "active", skips the delegated-signer registration check), same as the primary. Single-recovery wallets behave exactly as before since the list has one entry. The public full-list accessor is namedrecoveryMethods.Test plan
pnpm --filter @crossmint/wallets-sdk test:vitest— 704 passed; 68 skipped.pnpm lintcompleted with the repository's existing Biome diagnostics.Package updates
@crossmint/wallets-sdk—.changeset/recovery-signer-list.mddocuments therecoveryMethodsaccessor.Link to Devin session: https://crossmint.devinenterprise.com/sessions/fcb6200e227c4733967916f9fcdc9838
Open in Devin Desktop: https://crossmint.devinenterprise.com/desktop/session/fcb6200e227c4733967916f9fcdc9838?variant=devin
Requested by: @panosinthezone