Skip to content

fix(mbe): fix validation params for recovery#95

Merged
pranavjain97 merged 2 commits intomasterfrom
WP-5454-fix-btc-recovery-validation
Jul 30, 2025
Merged

fix(mbe): fix validation params for recovery#95
pranavjain97 merged 2 commits intomasterfrom
WP-5454-fix-btc-recovery-validation

Conversation

@pranavjain97
Copy link
Copy Markdown
Contributor

Ticket: WP-5454

@pranavjain97 pranavjain97 force-pushed the WP-5454-fix-btc-recovery-validation branch from 31ba2ce to fdc1b13 Compare July 29, 2025 16:41
@pranavjain97 pranavjain97 force-pushed the WP-5454-fix-btc-recovery-validation branch from fdc1b13 to a98af04 Compare July 29, 2025 16:49
@pranavjain97 pranavjain97 marked this pull request as ready for review July 29, 2025 18:59
alextse-bg
alextse-bg previously approved these changes Jul 30, 2025
return;
}

if (isUtxoCoin(sdkCoin)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can utxo ever be mpc?

}

if (isUtxoCoin(sdkCoin)) {
if (params.solanaRecoveryOptions || params.evmRecoveryOptions) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I thought you are going to change this to !params.utxoReocveryOptions

@pranavjain97 pranavjain97 force-pushed the WP-5454-fix-btc-recovery-validation branch from 266874f to 2cb0934 Compare July 30, 2025 01:02
@pranavjain97 pranavjain97 changed the title fix(mbe): fix validation params order for utxo fix(mbe): fix validation params for recovery Jul 30, 2025
@pranavjain97 pranavjain97 force-pushed the WP-5454-fix-btc-recovery-validation branch from 2cb0934 to 4030a48 Compare July 30, 2025 01:14
@pranavjain97 pranavjain97 force-pushed the WP-5454-fix-btc-recovery-validation branch from 4030a48 to d316e35 Compare July 30, 2025 01:17
@pranavjain97 pranavjain97 enabled auto-merge July 30, 2025 01:24
Comment on lines +75 to +79
if (!params.solanaRecoveryOptions) {
throw new ValidationError('Solana recovery options are required for EdDSA coin recovery');
}
} else if (isEcdsaCoin(sdkCoin)) {
return;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this is correct, you can broadcast a sol recovery transaction without a durable nonce.

Comment on lines +101 to +104
if (!isMpcRecovery && isEthLikeCoin(sdkCoin)) {
// Non-ECDSA ETH-like coins need evmRecoveryOptions for standard recovery
if (!params.evmRecoveryOptions) {
throw new ValidationError('EVM recovery options are required for ETH-like coin recovery');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

evmRecoveryOptions this should be optional no?

@pranavjain97 pranavjain97 merged commit b9a0d1d into master Jul 30, 2025
4 checks passed
@pranavjain97 pranavjain97 deleted the WP-5454-fix-btc-recovery-validation branch July 30, 2025 01:47
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.

3 participants