diff --git a/web/cashtab/config/webpack.config.js b/web/cashtab/config/webpack.config.js --- a/web/cashtab/config/webpack.config.js +++ b/web/cashtab/config/webpack.config.js @@ -280,6 +280,7 @@ }, mangle: { safari10: true, + reserved: ['BigInteger'], }, // Added for profiling in devtools keep_classnames: isEnvProductionProfile, 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 @@ -271,7 +271,6 @@ ); const txBuilderResponse = signUtxosByAddress( - BCH, mockSingleInputUtxo, wallet, outputObj, @@ -339,7 +338,6 @@ ); const txBuilderResponse = signUtxosByAddress( - BCH, mockSingleInputUtxo, wallet, outputObj, 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 @@ -152,7 +152,7 @@ return Bitcoin.ECPair.fromWIF(wif, xecBitcoinJSLib); }; -export const signUtxosByAddress = (BCH, inputUtxos, wallet, txBuilder) => { +export const signUtxosByAddress = (inputUtxos, wallet, txBuilder) => { for (let i = 0; i < inputUtxos.length; i++) { const utxo = inputUtxos[i]; const accounts = [wallet.Path245, wallet.Path145, wallet.Path1899]; @@ -161,7 +161,7 @@ .filter(acc => acc.cashAddress === utxo.address) .pop().fundingWif; - const utxoECPair = BCH.ECPair.fromWIF(wif); + const utxoECPair = getECPairFromWIF(wif); txBuilder.sign( i, @@ -714,7 +714,7 @@ } // Sign each XEC UTXO being consumed and refresh transactionBuilder - txBuilder = signUtxosByAddress(BCH, inputUtxos, wallet, txBuilder); + txBuilder = signUtxosByAddress(inputUtxos, wallet, txBuilder); let hex; try {