fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only#22196
Merged
fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only#22196
Conversation
Thunkar
approved these changes
Apr 1, 2026
AztecBot
pushed a commit
that referenced
this pull request
Apr 1, 2026
…-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=1
Collaborator
Author
|
✅ Successfully backported to backport-to-v4-next-staging #22205. |
AztecBot
added a commit
that referenced
this pull request
Apr 1, 2026
BEGIN_COMMIT_OVERRIDE cherry-pick: feat: move event size check from declaration to private emission (#22168) fix: prevent oracle failure on tag computation for invalid recipient (#22163) feat: move event size check from declaration to private emission (#22168) [v4-next backport] (#22182) fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only (#22196) fix: use Fr.fromString for CLI wallet claim params to handle decimal values (#22197) fix: indefinite retry for prover node and agent broker communication (#22202) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When running any CLI wallet command with
--estimate-gas-onlyand 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
peekBridgedFeeJuicemethod toWalletDBthat reads the top of the claim stack without removing it, and uses it whenestimateOnlyis true.Changes
peekBridgedFeeJuice()toWalletDB— reads top-of-stack without decrementing the pointerestimateOnlyflag through toparsePaymentMethod()to select peek vs popTest plan
deploy-account --estimate-gas-only --payment method=fee_juice,claim=true— claim should still be available afterdeploy-account --payment method=fee_juice,claim=true— claim should be consumed as beforeClaudeBox log: https://claudebox.work/s/16b824b54402040d?run=1