1. Wallet state matrix
Connected, disconnected, wrong-chain and missing-provider states mapped to balance, allowance and button behavior.
HealthChain issue #24 is now closed by a focused PR that fixes the broken USDC hook path: connected-wallet balance reads, no-wallet guards, allowance checks, approve receipt waiting, and final transfer receipt tracking. This fixed-scope readback packages the remaining buyer/user contract before any live health-payment flow depends on it.
Connected, disconnected, wrong-chain and missing-provider states mapped to balance, allowance and button behavior.
No-spend fixtures for enough allowance, insufficient allowance, approval pending/success/revert and transfer pending/success/revert.
Copy-ready user messages for approval waiting, transfer failure, duplicate-click prevention and support escalation.
PR Mosss-OS/healthchain#51 was merged on 2026-05-23, closing issue #24. It moved the payment hook away from the zero-address balance placeholder, waits for approval receipts before transfer, and tracks the final transfer hash.
Verification run for the merged PR:
npm test — 2 files / 6 tests passed.npx tsc --noEmit --pretty false — passed.npm run build — passed with existing Privy/Rollup annotation and chunk-size warnings only.npm run lint — passed with pre-existing fast-refresh warnings in untouched UI components.git diff --check — passed.balanceOf, allowance, approval receipt, transfer receipt, revert and user-reject paths.requiresUSDCApproval, disabled button states, duplicate-click prevention, hash display and final receipt confirmation.This is a no-spend readback. It does not sign wallet messages, approve tokens, send transfers, move funds, call paid endpoints, touch private keys, or accept payment terms. If a live paid settlement trace is ever needed, Peter approval is required first.