IBC Only Swaps
Understand how to use the IBC Only Swaps components
IBCSwaps
Props
className
(optional)
className
(optional)Add classes to customise the styling
title
(optional)
title
(optional)Use to set the title of tab.
Default Value - "IBC Swaps"
showPoweredByBanner
(optional)
showPoweredByBanner
(optional)This is a boolean which toggles the visibility for the powered by text for the tab - Powered by Leap and Skip
Default Value - false
defaultValues
(optional)
defaultValues
(optional)This is an object that contains the default values for the tab
sourceChainId
: chainId of the source chainsourceAsset
: denom of source assetdestinationChainId
: chainId of the destination chaindestinationAsset
: denom of destination assetinputAmount
: input amount of swap in string
defaultSettings
(optional)
defaultSettings
(optional)This is an object that contains the default settings for the tab
slippage
: max slippage percentage allowed for the swap
allowedSourceChains
(optional)
allowedSourceChains
(optional)Pass in an array of objects with a chainId
property set to the chains you want to display on the source side.
allowedDestinationChains
(optional)
allowedDestinationChains
(optional)Pass in an array of objects with a chainId
property set to the chains you want to display on the source side. You can also restrict the denominations
for each chain.
txnLifecycleHooks
(optional)
txnLifecycleHooks
(optional)This is an object that contains the callbacks for transaction lifecycle
onTxnSignInit
- callback fired when a transaction signing request is initiatedonTxnSignApproved
- callback fired when a transaction signing request is approved and the transaction has been accepted on chainonTxnSignFailed
- callback fired when a transaction signing request is rejected from walletonTxnComplete
- callback fired when a swap completesonTxnInProgress
- callback fired when a transaction is initiated, you can return a cleanup callback that fires when the transaction has been accepted on chain
onValuesChange
(optional)
onValuesChange
(optional)This a callback which is fired when following values are changed for a swap
sourceChainId
: chainId of the source chainsourceAsset
: denomination of source assetdestinationChainId
: chainId of the destination chaindestinationAsset
: denomination of destination assetinputAmount
: input amount of swap in string
onSettingsChange
(optional)
onSettingsChange
(optional)This a callback which is fired when swap settings are changed (i.e slippage)
Last updated