SendTransactionPayModalConfig

Configuration for the "Pay Modal" that opens when the user doesn't have enough funds to send a transaction. Set payModal: false to disable the "Pay Modal" popup

This configuration object includes the following properties to configure the "Pay Modal" UI:

locale

The language to use for the "Pay Modal" UI. Defaults to "en_US" .

supportedTokens

An object of type SupportedTokens to configure the tokens to show for a chain.

theme

The theme to use for the "Pay Modal" UI. Defaults to "dark" .

It can be set to "light" or "dark" or an object of type Theme for a custom theme.

Refer to lightTheme or darkTheme helper functions to use the default light or dark theme and customize it.

type SendTransactionPayModalConfig =
| {
buyWithCrypto?: false | { testMode?: boolean };
buyWithFiat?:
| false
| {
preferredProvider?: FiatProvider;
prefillSource?: {
currency?: "USD" | "CAD" | "GBP" | "EUR" | "JPY";
};
testMode?: boolean;
};
locale?: LocaleId;
metadata?: { image?: string; name?: string };
onPurchaseSuccess?: (
info:
| { status: BuyWithCryptoStatus; type: "crypto" }
| { status: BuyWithFiatStatus; type: "fiat" },
) => void;
purchaseData?: object;
supportedTokens?: SupportedTokens;
theme?: Theme | "light" | "dark";
}
| false;