fix(payments): T03 wait for the new wallet to be funded before checking balance#1675
Closed
fahadfa-aws wants to merge 1 commit into
Closed
Conversation
…ng balance Section 1 creates a brand new payment instrument for tutorial-03-user. Section 2 prints faucet instructions, Section 3 prints delegation instructions, then Section 4 immediately calls GetPaymentInstrumentBalance against the new (unfunded) wallet. The API returns: ValidationException: No balance found on chain 'base-sepolia' for token 'USDC' A user reading the output sees a confusing AWS API error instead of a clean "0.00 USDC" or a meaningful next step. The earlier print at line 148 says "ACTION REQUIRED: Fund the wallet before continuing" but the script never actually pauses. Add the same input() pause that Tutorial 00 uses at setup_agentcore_payments.py:412 — wait for the operator to confirm the new wallet is funded and signing is granted, then proceed to Section 4 where the balance check will return a real number.
Author
|
@mvangara10 — flagging this for your review when you have a moment. Tagged across the full set of payments-tutorial fixes I've been pushing today; happy to walk through any of them. Audit logs and test evidence are referenced in the PR description. |
Author
|
Superseded by #1738 (consolidated PR) |
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.
Issue
Tutorial 03 Section 1 creates a brand-new payment instrument for
tutorial-03-user. Section 2 prints faucet instructions and Section 3 prints delegation instructions, but the script then runs straight into Section 4, which callsGetPaymentInstrumentBalanceagainst the unfunded wallet. The API returns:```
ValidationException: No balance found on chain 'base-sepolia' for token 'USDC'
```
A user reading the output sees a confusing AWS API error rather than a clean balance read. The print at line 148 says "ACTION REQUIRED: Fund the wallet before continuing" but nothing in the script actually halts.
Reproduced from the original test session at
T03_user_onboarding.log:73.Changes
user_onboarding.py:170— add aninput(\"Press Enter when the new wallet is funded and signing is granted... \")pause at the end of Section 3, before Section 4's balance check.This matches the existing pattern at
setup_agentcore_payments.py:412in Tutorial 00, which uses an identicalinput()after its delegation instructions before checking balance.Two-line change. No semantic change for users on the happy path who run through interactively — they pause where the README's tone already implied they should pause. For users running unattended, this is the smallest possible behavior change to make the "before continuing" promise true.
Verification
setup_agentcore_payments.py:412is the established precedent for this pattern in the same tutorial set.