Skip to content

Add transaction pay quote usability fallback#8581

Draft
pedronfigueiredo wants to merge 1 commit intopnf/bidirectional-fallbackfrom
pnf/pay-quote-usability-fallback
Draft

Add transaction pay quote usability fallback#8581
pedronfigueiredo wants to merge 1 commit intopnf/bidirectional-fallbackfrom
pnf/pay-quote-usability-fallback

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

@pedronfigueiredo pedronfigueiredo commented Apr 24, 2026

Description

This follow-up keeps the Transaction Pay fallback principle intact after provider quotes are constructed. A strategy can now return technically supported quotes but still be skipped if those quotes are unusable for the current account context, such as when they require origin native gas that the account cannot pay.

The quote loop now checks strategy support, fetches quotes, checks provider quote support, then runs a normalized quote usability check before selecting the strategy. If the first strategy is unusable, the controller logs the reason and continues to the next configured strategy. This lets Across remain first when the account can complete the route, while allowing Relay to win when it can provide a gasless path for the same situation.

Changes

  • Added checkQuoteUsability to evaluate quote requirements against native source-chain balance.
  • Continued strategy fallback when a quote requires origin native gas that the account cannot cover.
  • Preserved the existing post-quote provider support check for authorization-list limitations.
  • Added regression coverage for Across-to-Relay fallback and for Across still winning when the account can pay origin gas.
  • Added direct quote-usability coverage for authorization-list, native-source, non-object original quote, invalid amount, and missing amount branches.

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/pay-quote-usability-fallback branch from 9992242 to 971e575 Compare April 24, 2026 18:56
@pedronfigueiredo pedronfigueiredo self-assigned this Apr 24, 2026
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/pay-quote-usability-fallback branch from 971e575 to 8265af9 Compare April 24, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant