Skip to content

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Nov 13, 2025

Explanation

Always get a quote if using the Relay strategy and the required token is Arbitrum USDC, even if the payment token matches.

References

Related to #6247

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Always retrieve a quote for Arbitrum USDC on Arbitrum when using Relay and refactor getStrategy from async to sync across controller, types, utils, and tests.

  • Behavior/Logic:
    • Always require a quote when strategy is Relay and required token is Arbitrum USDC (ARBITRUM_USDC_ADDRESS on CHAIN_ID_ARBITRUM), even if payment token matches (utils/source-amounts.ts).
  • API/Types (BREAKING):
    • Change TransactionPayController getStrategy option and action handler from asynchronous to synchronous; update signatures in types.ts and usage across codebase.
  • Implementation:
    • Replace await getStrategy(...) with synchronous calls in helpers/TransactionPayPublishHook, utils/quotes.ts, and strategy utilities.
    • Add helper logic isQuoteAlwaysRequired and getStrategyType to determine when to bypass same-token short-circuit.
  • Tests:
    • Update tests to use synchronous getStrategy expectations and cover the Arbitrum USDC + Relay case.
  • Changelog:
    • Document breaking change and new quote behavior in CHANGELOG.md.

Written by Cursor Bugbot for commit fd6a5d7. This will update automatically on new commits. Configure here.

@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review November 13, 2025 12:12
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner November 13, 2025 12:12
@matthewwalsh0 matthewwalsh0 changed the title fix: use relay if arbitrum USDC deposit fix: use relay if Arbitrum USDC deposit Nov 13, 2025
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner November 13, 2025 12:14
OGPoyraz
OGPoyraz previously approved these changes Nov 13, 2025
@matthewwalsh0 matthewwalsh0 enabled auto-merge (squash) November 13, 2025 12:44
@matthewwalsh0 matthewwalsh0 force-pushed the fix/relay-arbitrum-usdc branch from a5261e8 to fd6a5d7 Compare November 13, 2025 12:44
@matthewwalsh0 matthewwalsh0 merged commit 9629601 into main Nov 13, 2025
271 checks passed
@matthewwalsh0 matthewwalsh0 deleted the fix/relay-arbitrum-usdc branch November 13, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants