poc: non-evm native confirmations#43531
Draft
matthewwalsh0 wants to merge 28 commits into
Draft
Conversation
…or dependency isolation
…onfirm page Routes universalTransaction approvals through the existing <Confirm> page + <Info> dispatcher (parallel to EVM transactions) instead of a separate /confirm-multichain-transaction route. Adds UniversalTransactionInfo with heading, network, origin, from, to and fee rows backed by a new useUniversalTransactionData hook.
… loader - Route universalTransaction approvals through WalletInitiatedHeader so AdvancedDetailsButton renders; back button calls onCancel - Fee row: render `<amount> [icon] SOL` right-aligned. Collapsed shows fiat inline; advanced toggle shows native main line with fiat sub-line - Move Network fee into its own ConfirmInfoSection to match EVM grouping - Show ConfirmLoader inside UniversalTransactionInfo while pending tx data is propagating - Non-EVM Send submit now navigates to /confirm-transaction?loader=Send so the EVM-style InfoSkeleton renders while the snap creates the approval (instead of the send-page LOADER screen)
This was referenced Jun 14, 2026
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.
Description
POC to demonstrate the use of fully native confirmations for non-EVM transactions.
The API is protocol-agnostic. The Solana wallet Snap is the first consumer used to exercise the flow end to end.
The Snap still owns the transaction lifecycle: protocol-specific transaction construction, signing, submission, and fee calculation. The client owns the confirmation lifecycle using a base pending transaction definition that carries the protocol-agnostic display and validation data needed by the native confirmation.
Architecture Summary
signAndSendTransactionas part of the client Send flow.snap_confirmTransaction.MultichainTransactionsController.pendingTransactions.ApprovalControllerrequest with typeuniversalTransaction.Benefits
MetaMask/snaps
@metamask/snaps-rpc-methodsdefines the restricted confirmation methods.snap_confirmTransactionaccepts:snap_updateConfirmTransactionaccepts:The Snaps changes:
snap_confirmTransaction.snap_updateConfirmTransaction.snap_confirmTransactionto show the native confirmation and return the approval result.MetaMask/core
@metamask/multichain-transactions-controllerprovides the temporary Snap-to-UI state bridge.Pending universal transaction state is keyed by
approvalId:The Core changes:
pendingTransactionskeyed byapprovalId.PendingMultichainTransaction.addPendingTransaction,updatePendingTransaction, andremovePendingTransaction.MetaMask/metamask-extension
Snaps Platform Integration
Extension connects the Snaps Platform hook to approval infrastructure:
showUniversalTransactionConfirmation.approvalId.MultichainTransactionsController.pendingTransactions.ApprovalControllerrequest with typeuniversalTransaction.(snapId, id)pairs to internal approval IDs.updateUniversalTransactionConfirmationhook sosnap_updateConfirmTransactioncan patch pending Core state while the confirmation is active.Confirmation UI
Extension renders the native confirmation:
universalTransactionapprovals to universal confirmation UI.approvalId.customdata.custom.countto demonstrate Snap-specific custom data updates.Send Flow Integration
Extension aligns non-EVM Send loading and validation with the native confirmation flow:
loader=Sendwhile Snap approval is being prepared.onAmountInputvalidation for non-EVM sends.Balance Handling
This POC keeps native confirmation UX ownership separate from balance retrieval ownership.
The client no longer calls the Snap
onAmountInputpath to validate non-EVM amounts before creating the send request. Send validates entered amounts against client-owned balance state, then the native universal confirmation performs the final affordability check against the Snap-provided raw amount and aggregate fee requirement.For supported Solana balances, Send and universal confirmation wait for Accounts API v5 balance data instead of falling back to Snap-backed balance state.
MetaMask/snap-solana-wallet
The Solana wallet Snap is the first consumer:
SendServicebuilds the Solana transaction.snap_confirmTransactionbefore signing or submitting.snap_updateConfirmTransactionwhile the confirmation is active to updatecustom.count.SolMethod.SignAndSendTransactiononly if approved.Centralized Balances
Centralized non-EVM balance retrieval can be implemented separately from native confirmations.
For this POC, the client performs Send amount validation and final confirmation affordability checks using client-owned balance data. The Snap still calculates the protocol transaction and aggregate fee requirement, then passes the raw amount and fee data into the pending transaction definition.
A production balance-centralization path can reuse the same ownership split without requiring native confirmations: clients can refresh and cache non-EVM balances through controllers, pass the relevant balances to Snap-rendered flows when needed, and keep Snaps focused on protocol transaction construction and submission.
References
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist