Skip to content

Vaults#747

Open
Rigidity wants to merge 11 commits intomainfrom
vaults
Open

Vaults#747
Rigidity wants to merge 11 commits intomainfrom
vaults

Conversation

@Rigidity
Copy link
Copy Markdown
Collaborator

@Rigidity Rigidity commented Feb 19, 2026

Note

High Risk
High risk because it introduces new wallet kinds (vault/watch), adds a new database migration and puzzle-kind handling, and refactors core wallet/key APIs across Rust backend, RPC/OpenAPI, Tauri commands, and the React app.

Overview
Adds multi-wallet types by replacing the prior key-centric API model with WalletRecord/WalletKind (bls, vault, watch), renaming endpoints (import_wallet, get_wallets, etc.) and updating OpenAPI/TypeScript bindings accordingly.

Introduces initial vault plumbing end-to-end: new AssetKind::Vault/CoinKind::Vault, new P2 puzzle kinds (Vault, External) with DB support (including migration 0006_vaults.sql and new insert/query paths), and guards to skip derivation logic for non-BLS wallets while preventing selection/spending of vault coins.

Updates the frontend to match the new wallet model and adds new routes/pages for Mint Vault, Recover Vault (stubbed), Watch Address (imports read-only addresses), plus a Keys management page; also refactors shared UI with new DurationInput and MnemonicDisplay components and bumps lucide-react.

Written by Cursor Bugbot for commit 200ea89. This will update automatically on new commits. Configure here.

@Rigidity
Copy link
Copy Markdown
Collaborator Author

bugbot run

@Rigidity Rigidity marked this pull request as ready for review February 25, 2026 03:56
@Rigidity Rigidity marked this pull request as draft February 25, 2026 03:56
@Rigidity

This comment was marked as outdated.

@Rigidity

This comment was marked as outdated.

@Rigidity

This comment was marked as outdated.

@Rigidity Rigidity marked this pull request as ready for review February 25, 2026 21:00
@Rigidity
Copy link
Copy Markdown
Collaborator Author

@cursor review

let fingerprint = u32::from_be_bytes(self.rng.r#gen::<[u8; 4]>());

if self.contains(fingerprint) {
return Err(KeychainError::KeyExists);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Random fingerprint collision returns error instead of retrying

Low Severity

add_watch_p2_puzzle_hashes generates a random u32 fingerprint and returns KeychainError::KeyExists if it collides with an existing fingerprint. Since the fingerprint is random and the collision check doesn't retry, users could get an unexplained "Key already exists" error when importing a watch-only wallet, even though the addresses are unique. The add_vault method has the same issue deriving a fingerprint from launcher_id bytes.

Fix in Cursor Fix in Web

}
}
} else {
info!("Wallet is a vault, skipping automatic key derivation");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Log message says "vault" for watch wallets too

Low Severity

The else branch on the matches!(wallet.info, WalletInfo::Bls { .. }) check covers both Vault and Watch wallet types, but the log message says "Wallet is a vault." Watch wallets would produce a misleading log entry, making debugging harder.

Fix in Cursor Fix in Web

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.


const handleCreate = () => {
toast.success(t`Vault creation is not yet implemented.`);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Success toast used for unimplemented vault features

Medium Severity

toast.success is used to display "not yet implemented" messages in both MintVault and RecoverVault. After completing a multi-step wizard (generating and potentially saving mnemonics), users see a green success notification saying the feature doesn't work. This is actively misleading — toast.info or toast.warning would be appropriate for stub functionality.

Additional Locations (1)

Fix in Cursor Fix in Web

</h3>
<p className='break-all text-sm text-muted-foreground'>
{info.public_key}
{info.type === 'bls' && info.public_key}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Details dialog shows empty Public Key for non-BLS

Low Severity

The "Wallet Details" dialog unconditionally renders the "Public Key" heading for all wallet types. For vault and watch wallets, info.type === 'bls' && info.public_key evaluates to false, leaving the heading visible with no content below it. The entire block needs to be conditional on info.type === 'bls'.

Fix in Cursor Fix in Web

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