Withdraw Comonent
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 ETransfer app.
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.
See More: Installation | ETransfer
For the ETransferConfig
, ETransferStyleProvider
and ETransferWithdrawProvider
configuration used in the following examples, please refer to the ETransfer UI SDK Config
Field | Type | Required | Remarks |
className |
|
| The additional class to Withdraw. |
chainClassName |
|
| The additional class to SelectChain. |
fromClassName |
|
| The additional class to WithdrawFrom. |
componentStyle |
|
| Component style configuration items.
If you want to configure responsiveness, please switch the UI style at the appropriate time. Default is |
isShowErrorTip |
|
| Whether to automatically pop up error prompt. |
isShowMobilePoweredBy |
|
| Whether to display the mobile Powered By ETransfer logo. |
isListenNoticeAuto |
|
| Whether to establish a socket connection to listen for withdrawal transaction notifications. The default value is |
isShowProcessingTip |
|
| Whether to display a prompt for ongoing withdrawal transactions. The default value is |
onClickProcessingTip |
|
| The click event for the processing transaction tip. |
onActionChange |
|
| You can retrieve the current user's operation data within this method. |
onLogin |
|
| 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.
To get ETransferConfig authorization.jwt
, you can read ETransfer SDK Auth
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 more details and use cases, check out the github example code.
For any questions, please reach out to contact@etransfer.exchange.