Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/useBCH.js
Show First 20 Lines • Show All 504 Lines • ▼ Show 20 Lines | ) => { | ||||
if (encodedOpReturn) { | if (encodedOpReturn) { | ||||
transactionBuilder.addOutput(encodedOpReturn, 0); | transactionBuilder.addOutput(encodedOpReturn, 0); | ||||
} | } | ||||
// add output w/ address and amount to send | // add output w/ address and amount to send | ||||
transactionBuilder.addOutput( | transactionBuilder.addOutput( | ||||
BCH.Address.toCashAddress(destinationAddress), | BCH.Address.toCashAddress(destinationAddress), | ||||
BCH.BitcoinCash.toSatoshi(Number(sendAmount).toFixed(8)), | parseInt(toSmallestDenomination(value)), | ||||
); | ); | ||||
if ( | if ( | ||||
remainder >= | remainder >= | ||||
BCH.BitcoinCash.toSatoshi( | BCH.BitcoinCash.toSatoshi( | ||||
parseFloat(new BigNumber(currency.dust).toFixed(8)), | parseFloat(new BigNumber(currency.dust).toFixed(8)), | ||||
) | ) | ||||
) { | ) { | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |