Skip to content

Conversation

@DanielSinclair
Copy link
Contributor

@DanielSinclair DanielSinclair commented Jan 15, 2026

What changed (plus any additional context for devs)

  • Removed the assetNeedsUnlocking function and simplified the approval flow by directly using allowanceNeeded from the quote
  • Changed token approvals from using MaxUint256 (unlimited) to using the exact amount needed for the transaction
  • Updated the approvalAmount type in RainbowTransaction to accept any string value
  • Removed redundant parameters from estimateUnlockAndSwap and estimateUnlockAndCrosschainSwap functions
  • Simplified gas estimation logic for swaps by relying on the allowanceNeeded flag from quotes

Screen recordings / screenshots

N/A

What to test

  • Token approvals should now use the exact amount needed instead of unlimited approvals
  • Swaps should work correctly with the new approval flow
  • Gas estimation for swaps should be accurate
  • Cross-chain swaps should function properly with the new approval mechanism

@DanielSinclair
Copy link
Contributor Author

DanielSinclair commented Jan 15, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@DanielSinclair DanielSinclair changed the title feat: limit approvals based on approvalAmount quote gating feat: swap limit approvals Jan 15, 2026
@DanielSinclair DanielSinclair force-pushed the daniel/7702-finite-approvals branch from 4bcc176 to f17215a Compare January 17, 2026 22:05
@DanielSinclair DanielSinclair force-pushed the daniel/7702-delegation-sdk branch from 01c0c81 to eb710a4 Compare January 20, 2026 16:41
@DanielSinclair DanielSinclair force-pushed the daniel/7702-finite-approvals branch from f17215a to 2aa6ce3 Compare January 20, 2026 16:41
@DanielSinclair DanielSinclair force-pushed the daniel/7702-delegation-sdk branch from eb710a4 to a9ee495 Compare January 21, 2026 23:34
@DanielSinclair DanielSinclair force-pushed the daniel/7702-finite-approvals branch from 2aa6ce3 to 0aad274 Compare January 21, 2026 23:34
@DanielSinclair DanielSinclair force-pushed the daniel/7702-delegation-sdk branch from a9ee495 to d9ae41a Compare January 26, 2026 03:47
@DanielSinclair DanielSinclair force-pushed the daniel/7702-finite-approvals branch from 0aad274 to d8df1d0 Compare January 26, 2026 03:47
@DanielSinclair DanielSinclair force-pushed the daniel/7702-finite-approvals branch from d8df1d0 to 81d82b0 Compare January 26, 2026 08:34
@DanielSinclair DanielSinclair force-pushed the daniel/7702-delegation-sdk branch from d9ae41a to 53b22fe Compare January 26, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants