Appearance
Exchange Pay hooks
State hooks for Exchange Pay UI from @swapped/connect-sdk/react. Use event hooks for side effects (navigate, toast).
Selection hooks and createOrder() require ExchangePayContextProvider. Summary and useOnExchangePayOrder* hooks are provider-free.
| Hook | Returns / use for |
|---|---|
| useExchangePayProviders | Available exchanges + selected provider |
| useExchangePaySupportedCurrencies | Token list + minAmountFiat |
| useExchangePayCurrency | Selected currency |
| useExchangePayAmount | Amount + validation |
| useExchangePaySelection | Full selection snapshot + canSubmit |
| useExchangePayOrder | createOrder(), closeOrder, order, expiredOrder, status, … |
| Expiry & countdown | useExchangePayOrderExpiry / useExchangePayOrderCountdown |
| useExchangePayCompletedTransactionSummary | Success screen data (provider-free) |
| Event hooks | useOnExchangePayOrder* (provider-free) |