Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/utils/cashMethods.js
Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | try { | ||||
new BigNumber(thisXecUtxo.value), | new BigNumber(thisXecUtxo.value), | ||||
); | ); | ||||
const vout = thisXecUtxo.outpoint.outIdx; | const vout = thisXecUtxo.outpoint.outIdx; | ||||
const txid = thisXecUtxo.outpoint.txid; | const txid = thisXecUtxo.outpoint.txid; | ||||
// add input with txid and index of vout | // add input with txid and index of vout | ||||
txBuilder.addInput(txid, vout); | txBuilder.addInput(txid, vout); | ||||
totalXecInputUtxos.push(thisXecUtxo); | totalXecInputUtxos.push(thisXecUtxo); | ||||
txFee = calcFee(totalXecInputUtxos, txOutputs, feeInSatsPerByte); | txFee = calcFee( | ||||
totalXecInputUtxos, | |||||
txOutputs, | |||||
feeInSatsPerByte, | |||||
currency.opReturn.tokenGenesisMaxByteCount, | |||||
); | |||||
remainderXecValue = | remainderXecValue = | ||||
tokenAction === 'GENESIS' | tokenAction === 'GENESIS' | ||||
? totalXecInputUtxoValue | ? totalXecInputUtxoValue | ||||
.minus(new BigNumber(currency.etokenSats)) | .minus(new BigNumber(currency.etokenSats)) | ||||
.minus(new BigNumber(txFee)) | .minus(new BigNumber(txFee)) | ||||
: totalXecInputUtxoValue | : totalXecInputUtxoValue | ||||
.minus(new BigNumber(currency.etokenSats * 2)) // one for token send/burn output, one for token change | .minus(new BigNumber(currency.etokenSats * 2)) // one for token send/burn output, one for token change | ||||
▲ Show 20 Lines • Show All 915 Lines • Show Last 20 Lines |