swap: align plan previews with authorization and execution - #244
Closed
Makyl wants to merge 2 commits into
Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Align swap plan previews with runtime execution order and expose EOA token authorization as a first-class swap step. Plans now identify whether an allowance uses an approval or permit and whether source batches are EOA-submitted or sponsored.
Changes
allowanceswap step withmethod: 'approval' | 'permit'for source, destination, composed bridge, and direct EOA bridge authorization.submissionMode: 'eoa', keep native bridge value at the EOA, and align bridge step ordering with actual Nexus and Mayan execution.Testing
npm run lintnpm run typechecknpm testRisk / Impact
Medium. This adds fields and a new member to the public swap plan/progress unions, changes source and bridge step ordering, and moves read-only authorization resolution before plan preview. Wallet writes remain gated behind intent acceptance. The primary risks are incorrect allowance classification, progress-to-step mapping, and ordering regressions across native, sponsored, direct-bridge, and composed-bridge paths; these are covered by unit, type-surface, lifecycle, execution-contract, and characterization tests.