- Preparing search index...
- The search index is not available
wido-widget
Type alias WidoWidgetProps
Wido
Widget
Props
: { ethProvider
?: Web3Provider; snAccount
?: AccountInterface; toTokens
?: { chainId
: number; address
: string; }[]; fromTokens
?: { chainId
: number; address
: string; }[]; presetToToken
?: { chainId
: number; address
: string; }; presetFromToken
?: { chainId
: number; address
: string; }; partner
?: string; theme
?: Theme; width
?: string | number; className
?: string; title
?: string; largeTokenSelect
?: boolean; onFromTokenChange
?: ((token
: Currency) => void); onToTokenChange
?: ((token
: Currency) => void); onTxSubmit
?: ((hash
: string, tx
: Transaction) => void); onTxSuccess
?: ((hash
: string, receipt
: TransactionReceipt) => void); onTxFail
?: ((hash
: string, receipt
: TransactionReceipt) => void); onConnectWalletClick
?: ((chainId
: number) => void | boolean | Promise<boolean>); onError
?: ((error
: Error, info
?: ErrorInfo) => void); onSwitchChain
?: ((addChainParameter
: AddEthereumChainParameter) => void | Promise<void>); quoteApi
?: ((request
: QuoteRequest) => Promise<QuoteResult>); }
Type declaration
-
-
-
Optional
toTokens?: {
chainId: number;
address: string;
}[]
-
Optional
fromTokens?: {
chainId: number;
address: string;
}[]
-
Optional
presetToToken?: {
chainId: number;
address: string;
}
-
chainId: number
-
address: string
-
Optional
presetFromToken?: {
chainId: number;
address: string;
}
-
chainId: number
-
address: string
-
Optional
partner?: string
-
Optional
theme?: Theme
-
Optional
width?: string | number
-
Optional
className?: string
-
Optional
title?: string
-
Optional
largeTokenSelect?: boolean
-
Optional
onFromTokenChange?: ((token: Currency) => void)
-
Optional
onToTokenChange?: ((token: Currency) => void)
-
Optional
onTxSubmit?: ((hash: string, tx: Transaction) => void)
-
Optional
onTxSuccess?: ((hash: string, receipt: TransactionReceipt) => void)
-
Optional
onTxFail?: ((hash: string, receipt: TransactionReceipt) => void)
-
Optional
onConnectWalletClick?: ((chainId: number) => void | boolean | Promise<boolean>)
-
- (chainId: number): void | boolean | Promise<boolean>
-
Returns void | boolean | Promise<boolean>
-
Optional
onError?: ((error: Error, info?: ErrorInfo) => void)
-
- (error: Error, info?: ErrorInfo): void
-
Returns void
-
Optional
onSwitchChain?: ((addChainParameter: AddEthereumChainParameter) => void | Promise<void>)
-
Optional
quoteApi?: ((request: QuoteRequest) => Promise<QuoteResult>)
-
- (request: QuoteRequest): Promise<QuoteResult>
-
Returns Promise<QuoteResult>
Default
"Zap"