Skip to content

@swapped/connect-sdk / react / CoinbaseProviderProps

Type Alias: CoinbaseProviderProps

CoinbaseProviderProps = object

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:114

Props for CoinbaseProvider.

Properties

autoSelectNetwork?

optional autoSelectNetwork?: AutoSelectNetworkOption

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:133

Network auto-selection mode. Defaults to true.

See

AutoSelectNetworkOption


autoSelectToken?

optional autoSelectToken?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:127

Auto-select the first eligible balance when none is selected. Defaults to true.


children

children: ReactNode

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:115


clampToMax?

optional clampToMax?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:150

When true, typing above the blocking ceiling clamps instead of allowing the value. Defaults to false.


clampToMaxOnTokenChange?

optional clampToMaxOnTokenChange?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:158

When true, if the amount exceeds the new token's max after a token change (or when max updates), the amount is capped via Max. Defaults to false.

Ignored when resetAmountOnTokenChange is also enabled (amount is cleared instead).


defaultCurrency?

optional defaultCurrency?: TokenSymbol

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:123

Initial selected currency when auto-select is disabled or as a preferred default.


defaultNetwork?

optional defaultNetwork?: Network

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:125

Initial selected network when auto-select is disabled or as a preferred default.


enabled?

optional enabled?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:117

Skip fetching balances until explicitly enabled.


firstNonZeroDecimalInput?

optional firstNonZeroDecimalInput?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:179

Expand dust past display decimals in the crypto amount input. Independent of display firstNonZeroDecimal. Defaults to resolveFirstNonZeroDecimalInput (false when unset).


maxAmountMode?

optional maxAmountMode?: MaxAmountMode

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:145

Which max ceiling blocks submit / Max.

  • 'balance' (default) — Max sets the raw aggregated balance; above_spendable is a non-blocking warning (submit auto-caps via fee-reserve adjustment).
  • 'spendable' — Max sets balance minus the fee reserve; above_spendable blocks submit (strict flow).

maxDecimals?

optional maxDecimals?: (token) => number

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:168

Max fraction digits allowed while typing the withdrawal amount. Defaults to getTokenDisplayDecimals for the selected token.

Parameters

token

TokenSymbol

Returns

number

Example

tsx
<CoinbaseProvider maxDecimals={token => (token === 'ETH' ? 8 : 2)}>

maxFiatDecimals?

optional maxFiatDecimals?: number

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:173

Max fraction digits while typing the fiat amount. Defaults to resolveMaxFiatDecimals.


onlyAboveMin?

optional onlyAboveMin?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:121

When true, omit balances that fail min / fee checks from balances.


onlySupported?

optional onlySupported?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:119

When true, omit unsupported tokens from useCoinbaseBalances().balances.


resetAmountOnTokenChange?

optional resetAmountOnTokenChange?: boolean

Defined in: src/react/coinbase/providers/CoinbaseProvider.tsx:135

Clear amount / touched when the selected token changes. Defaults to false.