diff --git a/web/cashtab/src/hooks/useBCH.js b/web/cashtab/src/hooks/useBCH.js --- a/web/cashtab/src/hooks/useBCH.js +++ b/web/cashtab/src/hooks/useBCH.js @@ -456,7 +456,6 @@ // generate the tx inputs and add to txBuilder instance // returns the updated txBuilder, txFee, totalInputUtxoValue and inputUtxos let txInputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, diff --git a/web/cashtab/src/utils/__tests__/cashMethods.test.js b/web/cashtab/src/utils/__tests__/cashMethods.test.js --- a/web/cashtab/src/utils/__tests__/cashMethods.test.js +++ b/web/cashtab/src/utils/__tests__/cashMethods.test.js @@ -220,7 +220,6 @@ // mock tx input const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -282,7 +281,6 @@ // mock tx input const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -749,7 +747,6 @@ }); it(`generateTxInput() returns an input object for a valid one to one XEC tx`, async () => { - const BCH = new BCHJS(); const isOneToMany = false; const utxos = mockNonSlpUtxos; let txBuilder = new TransactionBuilder(); @@ -758,7 +755,6 @@ const feeInSatsPerByte = currency.defaultFee; const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -773,7 +769,6 @@ }); it(`generateTxInput() returns an input object for a valid one to many XEC tx`, async () => { - const BCH = new BCHJS(); const isOneToMany = true; const utxos = mockNonSlpUtxos; let txBuilder = new TransactionBuilder(); @@ -786,7 +781,6 @@ const feeInSatsPerByte = currency.defaultFee; const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -801,7 +795,6 @@ }); it(`generateTxInput() throws error for a one to many XEC tx with invalid destinationAddressAndValueArray input`, async () => { - const BCH = new BCHJS(); const isOneToMany = true; const utxos = mockNonSlpUtxos; let txBuilder = new TransactionBuilder(); @@ -812,7 +805,6 @@ let thrownError; try { generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -827,7 +819,6 @@ }); it(`generateTxInput() throws error for a one to many XEC tx with invalid utxos input`, async () => { - const BCH = new BCHJS(); const isOneToMany = true; const utxos = null; let txBuilder = new TransactionBuilder(); @@ -842,7 +833,6 @@ let thrownError; try { generateTxInput( - BCH, isOneToMany, utxos, txBuilder, diff --git a/web/cashtab/src/utils/__tests__/txBuilder.test.js b/web/cashtab/src/utils/__tests__/txBuilder.test.js --- a/web/cashtab/src/utils/__tests__/txBuilder.test.js +++ b/web/cashtab/src/utils/__tests__/txBuilder.test.js @@ -23,7 +23,6 @@ const satoshisToSend = new BigNumber(600); const txInputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, diff --git a/web/cashtab/src/utils/cashMethods.js b/web/cashtab/src/utils/cashMethods.js --- a/web/cashtab/src/utils/cashMethods.js +++ b/web/cashtab/src/utils/cashMethods.js @@ -288,7 +288,6 @@ }; export const generateTxInput = ( - BCH, isOneToMany, utxos, txBuilder, @@ -302,7 +301,6 @@ let totalInputUtxoValue = new BigNumber(0); try { if ( - !BCH || (isOneToMany && !destinationAddressAndValueArray) || !utxos || !txBuilder ||