Description
After rejecting a deposit in the wallet, retrying the same deposit causes the on-chain transaction to fail with:
Deposit failed: transaction failed (resultXdr: AAAAAAABfxD/////AAAAAQAAAAAAAAAY/////gAAAAA=)
Decoding the result XDR shows:
{"fee_charged":"98064","result":{"tx_failed":[{"op_inner":{"invoke_host_function":"trapped"}}]},"ext":"v0"}
invoke_host_function: trapped indicates the Soroban contract panicked during execution. This happens consistently when retrying a deposit that was previously rejected at the wallet signing step.
The likely cause is that local app/SDK state is mutated during transaction preparation (e.g., nullifiers computed, notes marked spent, Merkle tree updated) before the wallet confirms signing. When the user rejects, those local changes are not rolled back, so the retry builds a proof against an inconsistent state and the pool contract rejects it.
Acceptance criteria
Documentation link(s)
- Deposit/transfer flow:
app/js/ui/transactions.js
- State management / tx-planner:
sdk/tx-planner/, sdk/state/
- Architecture overview:
app/ARCHITECTURE.md
Description
After rejecting a deposit in the wallet, retrying the same deposit causes the on-chain transaction to fail with:
Decoding the result XDR shows:
{"fee_charged":"98064","result":{"tx_failed":[{"op_inner":{"invoke_host_function":"trapped"}}]},"ext":"v0"}invoke_host_function: trappedindicates the Soroban contract panicked during execution. This happens consistently when retrying a deposit that was previously rejected at the wallet signing step.The likely cause is that local app/SDK state is mutated during transaction preparation (e.g., nullifiers computed, notes marked spent, Merkle tree updated) before the wallet confirms signing. When the user rejects, those local changes are not rolled back, so the retry builds a proof against an inconsistent state and the pool contract rejects it.
Acceptance criteria
Documentation link(s)
app/js/ui/transactions.jssdk/tx-planner/,sdk/state/app/ARCHITECTURE.md