Appearance
@swapped/connect-sdk / react / UseExchangePaySelectionResult
Type Alias: UseExchangePaySelectionResult
UseExchangePaySelectionResult =
object
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:15
Result of useExchangePaySelection.
Properties
amount
amount:
string
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:21
Controlled amount string from useExchangePayAmount.
amountFloat
amountFloat:
number|null
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:23
Numeric representation of amount, or null when empty or invalid.
canSubmit
canSubmit:
boolean
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:31
Whether provider, currency, and amount are ready to create an order. Does not include a consumer maxAmountFiat from useExchangePayAmount options — also check that hook’s isValid when using a max.
minAmountFiat
minAmountFiat:
number|null
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:25
Minimum fiat amount (currently USD) for the selected currency, or null when none is selected.
reset
reset: () =>
void
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:33
Clear provider, currency, and amount selection.
Returns
void
selectedCurrency
selectedCurrency:
ExchangePaySupportedCurrency|undefined
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:19
Selected receive currency, or undefined when none.
selectedProvider
selectedProvider:
ExchangePayProvider|undefined
Defined in: src/react/exchange-pay/hooks/useExchangePaySelection.ts:17
Selected exchange provider, or undefined when none.