Open lopo1 opened 4 months ago
const param = { callbackUrl: 'http://someurl.com', // no need callback dappIcon: '', dappName: 'test', protocol: 'TronLink', version: '1.0', chainId: '0x2b6653dc', action: 'open', actionId: Date.now() + '' }
const encodedParam = encodeURIComponent(JSON.stringify(param)); console.log("encodedParam = " + encodedParam); const deeplinkUrl = tronlinkoutside://transfer?param=${encodedParam} // const deeplinkUrl = 'tronlink://pull.activity?param={}'; window.location.href = deeplinkUrl;
tronlinkoutside://transfer?param=${encodedParam}
How do I need to modify
If you want to transfer with TronLink App, you should set action: 'transfer'. Please refer to TronLink Developer Document.
action: 'transfer'
const param = { callbackUrl: 'http://someurl.com', // no need callback dappIcon: '', dappName: 'test', protocol: 'TronLink', version: '1.0', chainId: '0x2b6653dc', action: 'open', actionId: Date.now() + '' }
const encodedParam = encodeURIComponent(JSON.stringify(param)); console.log("encodedParam = " + encodedParam); const deeplinkUrl =
tronlinkoutside://transfer?param=${encodedParam}
// const deeplinkUrl = 'tronlink://pull.activity?param={}'; window.location.href = deeplinkUrl;How do I need to modify