mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
FIX: Reduced batchsize to prevent "undefined" error and allow viewing of transactions for these 2 wallet addresses: 34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo, 18rnfoQgGo1HqvVQaAN4QnxjYE7Sez9eca
This commit is contained in:
parent
f62ee7dd91
commit
387a15f1ef
2 changed files with 21 additions and 15 deletions
|
@ -339,7 +339,7 @@ module.exports.multiGetHistoryByAddress = async function(addresses, batchsize) {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports.multiGetTransactionByTxid = async function(txids, batchsize, verbose) {
|
module.exports.multiGetTransactionByTxid = async function(txids, batchsize, verbose) {
|
||||||
batchsize = batchsize || 61;
|
batchsize = batchsize || 40;
|
||||||
// this value is fine-tuned so althrough wallets in test suite will occasionally
|
// this value is fine-tuned so althrough wallets in test suite will occasionally
|
||||||
// throw 'response too large (over 1,000,000 bytes', test suite will pass
|
// throw 'response too large (over 1,000,000 bytes', test suite will pass
|
||||||
verbose = verbose !== false;
|
verbose = verbose !== false;
|
||||||
|
|
|
@ -67,21 +67,27 @@ describe('LegacyWallet', function() {
|
||||||
assert.ok(tx.confirmations > 1);
|
assert.ok(tx.confirmations > 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can fetch TXs when addresses for vout are missing', async () => {
|
|
||||||
// Transaction with missing address output https://www.blockchain.com/btc/tx/d45818ae11a584357f7b74da26012d2becf4ef064db015a45bdfcd9cb438929d
|
|
||||||
let w = new LegacyWallet();
|
|
||||||
w._address = '1PVfrmbn1vSMoFZB2Ga7nDuXLFDyJZHrHK';
|
|
||||||
await w.fetchTransactions();
|
|
||||||
|
|
||||||
assert.ok(w.getTransactions().length > 0);
|
it.each([
|
||||||
for (let tx of w.getTransactions()) {
|
['addresses for vout missing', '1PVfrmbn1vSMoFZB2Ga7nDuXLFDyJZHrHK'],
|
||||||
assert.ok(tx.hash);
|
['txdatas were coming back null from BlueElectrum because of high batchsize', '34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo'],
|
||||||
assert.ok(tx.value);
|
])(
|
||||||
assert.ok(tx.received);
|
'can fetch TXs when %s',
|
||||||
assert.ok(tx.confirmations > 1);
|
async (useCase, address) => {
|
||||||
}
|
let w = new LegacyWallet();
|
||||||
});
|
w._address = address;
|
||||||
|
await w.fetchTransactions();
|
||||||
|
|
||||||
|
assert.ok(w.getTransactions().length > 0);
|
||||||
|
for (let tx of w.getTransactions()) {
|
||||||
|
assert.ok(tx.hash);
|
||||||
|
assert.ok(tx.value);
|
||||||
|
assert.ok(tx.received);
|
||||||
|
assert.ok(tx.confirmations > 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
240000,
|
||||||
|
);
|
||||||
|
|
||||||
it('can fetch UTXO', async () => {
|
it('can fetch UTXO', async () => {
|
||||||
let w = new LegacyWallet();
|
let w = new LegacyWallet();
|
||||||
|
|
Loading…
Add table
Reference in a new issue