Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/useBCH.js
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | ) => { | ||||
null, // token amount - not applicable for GENESIS tx | null, // token amount - not applicable for GENESIS tx | ||||
feeInSatsPerByte, | feeInSatsPerByte, | ||||
txBuilder, | txBuilder, | ||||
); | ); | ||||
// update txBuilder object with inputs | // update txBuilder object with inputs | ||||
txBuilder = tokenTxInputObj.txBuilder; | txBuilder = tokenTxInputObj.txBuilder; | ||||
let tokenTxOutputObj = generateTokenTxOutput( | let tokenTxOutputObj = generateTokenTxOutput( | ||||
BCH, | |||||
txBuilder, | txBuilder, | ||||
'GENESIS', | 'GENESIS', | ||||
CREATION_ADDR, | CREATION_ADDR, | ||||
null, // token UTXOS being spent - not applicable for GENESIS tx | null, // token UTXOS being spent - not applicable for GENESIS tx | ||||
tokenTxInputObj.remainderXecValue, | tokenTxInputObj.remainderXecValue, | ||||
configObj, | configObj, | ||||
); | ); | ||||
// update txBuilder object with outputs | // update txBuilder object with outputs | ||||
▲ Show 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | ) => { | ||||
amount, | amount, | ||||
currency.defaultFee, | currency.defaultFee, | ||||
txBuilder, | txBuilder, | ||||
); | ); | ||||
// update txBuilder object with inputs | // update txBuilder object with inputs | ||||
txBuilder = tokenTxInputObj.txBuilder; | txBuilder = tokenTxInputObj.txBuilder; | ||||
let tokenTxOutputObj = generateTokenTxOutput( | let tokenTxOutputObj = generateTokenTxOutput( | ||||
BCH, | |||||
txBuilder, | txBuilder, | ||||
'SEND', | 'SEND', | ||||
CREATION_ADDR, | CREATION_ADDR, | ||||
tokenTxInputObj.inputTokenUtxos, | tokenTxInputObj.inputTokenUtxos, | ||||
tokenTxInputObj.remainderXecValue, | tokenTxInputObj.remainderXecValue, | ||||
null, // token config object - for GENESIS tx only | null, // token config object - for GENESIS tx only | ||||
tokenReceiverAddress, | tokenReceiverAddress, | ||||
amount, | amount, | ||||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | const burnToken = async (BCH, chronik, wallet, { tokenId, amount }) => { | ||||
amount, | amount, | ||||
currency.defaultFee, | currency.defaultFee, | ||||
txBuilder, | txBuilder, | ||||
); | ); | ||||
// update txBuilder object with inputs | // update txBuilder object with inputs | ||||
txBuilder = tokenTxInputObj.txBuilder; | txBuilder = tokenTxInputObj.txBuilder; | ||||
let tokenTxOutputObj = generateTokenTxOutput( | let tokenTxOutputObj = generateTokenTxOutput( | ||||
BCH, | |||||
txBuilder, | txBuilder, | ||||
'BURN', | 'BURN', | ||||
CREATION_ADDR, | CREATION_ADDR, | ||||
tokenTxInputObj.inputTokenUtxos, | tokenTxInputObj.inputTokenUtxos, | ||||
tokenTxInputObj.remainderXecValue, | tokenTxInputObj.remainderXecValue, | ||||
null, // token config object - for GENESIS tx only | null, // token config object - for GENESIS tx only | ||||
null, // token receiver address - for SEND tx only | null, // token receiver address - for SEND tx only | ||||
amount, | amount, | ||||
▲ Show 20 Lines • Show All 304 Lines • Show Last 20 Lines |