Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/utils/cashMethods.js
Show First 20 Lines • Show All 622 Lines • ▼ Show 20 Lines | try { | ||||
console.log('Error in generateOpReturnScript(): ' + err); | console.log('Error in generateOpReturnScript(): ' + err); | ||||
throw err; | throw err; | ||||
} | } | ||||
return encodeOpReturnScript(script); | return encodeOpReturnScript(script); | ||||
}; | }; | ||||
export const generateTxOutput = ( | export const generateTxOutput = ( | ||||
BCH, | |||||
isOneToMany, | isOneToMany, | ||||
singleSendValue, | singleSendValue, | ||||
satoshisToSend, | satoshisToSend, | ||||
totalInputUtxoValue, | totalInputUtxoValue, | ||||
destinationAddress, | destinationAddress, | ||||
destinationAddressAndValueArray, | destinationAddressAndValueArray, | ||||
changeAddress, | changeAddress, | ||||
txFee, | txFee, | ||||
txBuilder, | txBuilder, | ||||
) => { | ) => { | ||||
try { | try { | ||||
if ( | if ( | ||||
!BCH || | |||||
(isOneToMany && !destinationAddressAndValueArray) || | (isOneToMany && !destinationAddressAndValueArray) || | ||||
(!isOneToMany && !destinationAddress && !singleSendValue) || | (!isOneToMany && !destinationAddress && !singleSendValue) || | ||||
!changeAddress || | !changeAddress || | ||||
!satoshisToSend || | !satoshisToSend || | ||||
!totalInputUtxoValue || | !totalInputUtxoValue || | ||||
!txFee || | !txFee || | ||||
!txBuilder | !txBuilder | ||||
) { | ) { | ||||
▲ Show 20 Lines • Show All 496 Lines • Show Last 20 Lines |