From f2c5d5def72a47a5dd71c828763b3eaeef38284c Mon Sep 17 00:00:00 2001 From: Fahad Farrukh Date: Fri, 12 Jun 2026 23:58:11 -0400 Subject: [PATCH] fix(payments): T03 wait for the new wallet to be funded before checking balance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .../03-user-onboarding-wallet-funding/user_onboarding.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/01-features/08-agents-that-transact/00-getting-started/03-user-onboarding-wallet-funding/user_onboarding.py b/01-features/08-agents-that-transact/00-getting-started/03-user-onboarding-wallet-funding/user_onboarding.py index 63549665e..a491e9147 100644 --- a/01-features/08-agents-that-transact/00-getting-started/03-user-onboarding-wallet-funding/user_onboarding.py +++ b/01-features/08-agents-that-transact/00-getting-started/03-user-onboarding-wallet-funding/user_onboarding.py @@ -167,6 +167,8 @@ print() print(" Without delegation: ProcessPayment fails with a signing error.") +input("\nPress Enter when the new wallet is funded and signing is granted... ") + # ───────────────────────────────────────────────────────────────────────────── # PART 2 — Backend Operations # ─────────────────────────────────────────────────────────────────────────────