Commit 9ce04f0
authored
fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only (#22196)
## Summary
When running any CLI wallet command with `--estimate-gas-only` and a
saved fee juice claim (`--payment method=fee_juice,claim=true`), the
wallet would pop the claim off the stack, consuming it. This meant the
claim was no longer available for the actual transaction.
This PR adds a `peekBridgedFeeJuice` method to `WalletDB` that reads the
top of the claim stack without removing it, and uses it when
`estimateOnly` is true.
## Changes
- Added `peekBridgedFeeJuice()` to `WalletDB` — reads top-of-stack
without decrementing the pointer
- Threaded `estimateOnly` flag through to `parsePaymentMethod()` to
select peek vs pop
## Test plan
- Run `deploy-account --estimate-gas-only --payment
method=fee_juice,claim=true` — claim should still be available after
- Run `deploy-account --payment method=fee_juice,claim=true` — claim
should be consumed as before
ClaudeBox log: https://claudebox.work/s/16b824b54402040d?run=12 files changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| 270 | + | |
269 | 271 | | |
270 | | - | |
271 | | - | |
| 272 | + | |
| 273 | + | |
272 | 274 | | |
273 | 275 | | |
274 | 276 | | |
| |||
0 commit comments