TransferTokens
Last updated
Last updated
This function triggers a modal for the user to confirm the transfer
Function to trigger a transfer for a native or ERC20 token. This will trigger a confirmation modal displaying a summary of the transaction and associated fees for the user.
TransferTokens(args)
Parameter | Type | Definition |
---|---|---|
None
Calling transfer without args
Calling transfer with args
args.callback?
Function
Function to callback upon txhash, success or failed transfer. Structure of result object passed into callback function:
args.to?
String
Address to send tokens to. If not passed in, will prompt user to enter address.
args.amount?
String
Amount to send in display units of the currency. So if you want the user to pay 0.5 ETH, pass in '0.5' to this field. If value not passed in, will prompt user to pass in the amount
args.currency?
asset (class)
Asset object of the currency you want to send. If value not passed in, will prompt user to pass in the currency