Page MenuHomePhabricator

D12631.diff
No OneTemporary

D12631.diff

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,6 +271,7 @@
);
const txBuilderResponse = signUtxosByAddress(
+ BCH,
mockSingleInputUtxo,
wallet,
outputObj,
@@ -338,6 +339,7 @@
);
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 = (inputUtxos, wallet, txBuilder) => {
+export const signUtxosByAddress = (BCH, 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 = getECPairFromWIF(wif);
+ const utxoECPair = BCH.ECPair.fromWIF(wif);
txBuilder.sign(
i,
@@ -714,7 +714,7 @@
}
// Sign each XEC UTXO being consumed and refresh transactionBuilder
- txBuilder = signUtxosByAddress(inputUtxos, wallet, txBuilder);
+ txBuilder = signUtxosByAddress(BCH, inputUtxos, wallet, txBuilder);
let hex;
try {

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 26, 11:11 (11 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5573374
Default Alt Text
D12631.diff (1 KB)

Event Timeline