Skip to content

Commit

Permalink
REF
Browse files Browse the repository at this point in the history
  • Loading branch information
Overtorment committed May 28, 2019
1 parent 9f3cd9b commit cc9ff80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions BlueElectrum.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ async function multiGetUtxoByAddress(addresses, batchsize) {
ret[scripthash2addr[utxos.param]] = utxos.result;
for (let utxo of ret[scripthash2addr[utxos.param]]) {
utxo.address = scripthash2addr[utxos.param];
utxo.txId = utxo.tx_hash;
utxo.vout = utxo.tx_pos;
delete utxo.tx_pos;
delete utxo.tx_hash;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions HDBech32Wallet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ describe('Bech32 Segwit HD (BIP84)', () => {
await hd.fetchUtxo();
let utxo = hd.getUtxo();
assert.strictEqual(utxo.length, 4);
assert.ok(utxo[0].tx_hash);
assert.ok(utxo[0].tx_pos === 0 || utxo[0].tx_pos === 1);
assert.ok(utxo[0].txId);
assert.ok(utxo[0].vout === 0 || utxo[0].vout === 1);
assert.ok(utxo[0].value);
assert.ok(utxo[0].address);
});
Expand Down

0 comments on commit cc9ff80

Please sign in to comment.