Skip to content

fix(wasm-solana): preserve stake withdrawal recipient - #402

Draft
ralph-bitgo[bot] wants to merge 1 commit into
masterfrom
WCN-1879-solana-stake-withdraw-recipient
Draft

ralph-bitgo[bot] wants to merge 1 commit into
masterfrom
WCN-1879-solana-stake-withdraw-recipient

Conversation

@ralph-bitgo

@ralph-bitgo ralph-bitgo Bot commented Sep 24, 2026

Copy link
Copy Markdown

What

  • Carry stake withdrawal account 1 as toAddress through the Rust and TypeScript parser outputs.
  • Reject unresolved compiled account indices rather than shifting instruction account roles.
  • Add Rust and generated-WASM recipient-differential and malformed-index regressions.

Why

A destination-free withdrawal representation can hide the account receiving lamports, so approval may not match the recipient bound in the signable transaction.

Test plan

  • cargo test --manifest-path packages/wasm-solana/Cargo.toml — 54 passed; 1 doctest passed.
  • npm run build --workspace @bitgo/wasm-solana && npm test --workspace @bitgo/wasm-solana — 108 passed.

Ticket: WCN-1879

Expose stake instruction account 1 as toAddress throughout the

Rust and TypeScript parser output. Reject unresolved account indices so

malformed transactions cannot shift account roles and misstate recipients.

Ticket: WCN-1879
Session-Id: 62e2bf02-4569-43fd-8dd6-e3697e48d9d9
Task-Id: db4ad411-11a1-4dff-86b3-b24d0f5731ff
@ralph-bitgo
ralph-bitgo Bot force-pushed the WCN-1879-solana-stake-withdraw-recipient branch from 3dddd98 to 6ccbb85 Compare September 24, 2026 01:09
@linear-code

linear-code Bot commented Sep 24, 2026

Copy link
Copy Markdown

WCN-1879

data: &data,
}) {
ParsedInstruction::StakingWithdraw(params) => params,
other => panic!("Expected StakingWithdraw, got {other:?}"),

This branch has not been deployed

No deployments
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.

2 participants