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 @@ -223,7 +223,6 @@ // mock tx input const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -285,7 +284,6 @@ // mock tx input const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -752,7 +750,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(); @@ -761,7 +758,6 @@ const feeInSatsPerByte = currency.defaultFee; const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -776,7 +772,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(); @@ -789,7 +784,6 @@ const feeInSatsPerByte = currency.defaultFee; const inputObj = generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -804,7 +798,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(); @@ -815,7 +808,6 @@ let thrownError; try { generateTxInput( - BCH, isOneToMany, utxos, txBuilder, @@ -830,7 +822,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(); @@ -845,7 +836,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 ||