Withdraw Component
Last updated
Last updated
Introduction
If you want to quickly access the ETransfer withdrawal function, please use this UI component. You will get the same UI display and withdrawal function as the .
Select chain: Select the aelf chain from which you will withdraw tokens.
Select token: Choose the token you wish to withdraw.
Input address: Enter the address where you want the tokens to be delivered.
Select network: Select the network where you want the tokens to be delivered.
Input amount: Enter the amount of tokens you wish to withdraw.
Estimated received: After entering the above information, detailed withdrawal information will be automatically retrieved. You will see the estimated amount received, fees, and gas costs.
Complete the withdrawal: Click the Withdraw button and follow the prompts to authorize the withdrawal, and you can complete the withdrawal.
Notification: You can see the processing transaction tip and the transaction completion notification.
Field
Type
Required
Remarks
className
string
false
The additional class to Withdraw.
chainClassName
string
false
The additional class to SelectChain.
fromClassName
string
false
The additional class to WithdrawFrom.
componentStyle
ComponentStyle
false
Component style configuration items.
ComponentStyle.Mobile
is a UI that is better adapted to mobile size.
ComponentStyle.Web
is a UI that is better adapted to web size.
If you want to configure responsiveness, please switch the UI style at the appropriate time.
Default is ComponentStyle.Web
isShowErrorTip
boolean
false
Whether to automatically pop up error prompt.
isShowMobilePoweredBy
boolean
false
Whether to display the mobile Powered By ETransfer logo.
isListenNoticeAuto
boolean
false
Whether to establish a socket connection to listen for withdrawal transaction notifications.
The default value is true
.
isShowProcessingTip
boolean
false
Whether to display a prompt for ongoing withdrawal transactions.
The default value is true
.
onClickProcessingTip
()=>void
false
The click event for the processing transaction tip.
onActionChange
(data:TWithdrawActionData)=>void
false
You can retrieve the current user's operation data within this method.
onLogin
()=>void
false
The wallet connection event.
Ensure that the network configuration (networkType
) , service URL (etransferUrl
) , authorization URL (etransferAuthUrl
) , socket URL (etransferSocketUrl
) and authorization (jwt
) are accurate.
Use a valid JWT token to ensure proper functionality.
If you are using the message notification feature, please actively call @etransfer/ui-react
unsubscribeUserOrderRecord
method to cancel the WebSocket listener when logging out.
For any questions, please reach out to contact@etransfer.exchange.
See More:
For the ETransferConfig
, ETransferStyleProvider
and ETransferWithdrawProvider
configuration used in the following examples, please refer to the
To get ETransferConfig authorization.jwt
, you can read
For more details and use cases, check out the .