Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function generateETHLink(receiverAddress, value, chainId) {
const data = {
chain_id: chainId,
function_name: undefined,
parameters: {
value: value + 'e18'
},
scheme: 'ethereum',
target_address: receiverAddress
};
return build(data);
}
export function generateERC20Link(receiverAddress, assetAddress, value, chainId) {
const data = {
chain_id: chainId,
function_name: 'transfer',
parameters: {
address: receiverAddress,
uint256: value
},
scheme: 'ethereum',
target_address: assetAddress
};
return build(data);
}