Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/utils/__tests__/txBuilder.test.js
Show All 31 Lines | it(`Transaction Builder returns correct builder object with valid input and output params`, () => { | ||||
); | ); | ||||
txBuilder = txInputObj.txBuilder; | txBuilder = txInputObj.txBuilder; | ||||
expect(JSON.stringify(txBuilder)).toStrictEqual( | expect(JSON.stringify(txBuilder)).toStrictEqual( | ||||
JSON.stringify(mockOnetoOneXecInputOnlyTxBuilderObj), | JSON.stringify(mockOnetoOneXecInputOnlyTxBuilderObj), | ||||
); | ); | ||||
// verify txBuilder after adding tx outputs | // verify txBuilder after adding tx outputs | ||||
txBuilder = generateTxOutput( | txBuilder = generateTxOutput( | ||||
BCH, | |||||
isOneToMany, | isOneToMany, | ||||
new BigNumber(6), // XEC denomination of 600 satoshisToSend | new BigNumber(6), // XEC denomination of 600 satoshisToSend | ||||
satoshisToSend, | satoshisToSend, | ||||
txInputObj.totalInputUtxoValue, | txInputObj.totalInputUtxoValue, | ||||
destinationAddress, | destinationAddress, | ||||
null, // destinationAddressAndValueArray | null, // destinationAddressAndValueArray | ||||
destinationAddress, // using the same destination address as changeAddress | destinationAddress, // using the same destination address as changeAddress | ||||
txInputObj.txFee, | txInputObj.txFee, | ||||
Show All 17 Lines |