Repository navigation
Verify a wallet-approved payment through both MCP tools - #6
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
The existing browser form creates its own order via the REST API, so it cannot prove the new MCP prepare → wallet payment → MCP receipt flow. Add /agents/check, a Turkish page that calls both MCP tools using the official SDK and keeps the exact original signed order through a user-approved 0.01 USDC self-transfer.
The page validates the entire unsigned transaction, checks the selected account and Base network, rejects unsupported smart accounts, checks balances, and simulates gas before requesting wallet approval. It stores the order before wallet approval and the transaction hash before receipt verification. Reloads recover the original attempt and do not start another payment. A rejected wallet request can be retried; an ambiguous wallet response requires recovering its existing transaction hash.
The final result includes the receipt, transaction and Builder Code without exporting the order token. Mainnet gas is real and explicitly disclosed. No transaction has been submitted by this change, and a fresh positive mainnet MCP receipt remains pending the user's wallet action. Also correct the prior unsupported README claim that a Dashboard URL edit was a confirmed required step.
Validation: 27 tests passed, lint passed, production Next build passed. Tests cover the original token through both tools, exact returned calldata, persistence before submission, mismatched wallet/network/account type/balances, altered payment data, duplicate submission prevention and mismatched receipts. Local browser automation was unavailable because Chromium is not installed; live UI inspection follows deployment.