mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
Merge pull request #1101 from mgurzenski/master
FIX: Reduced batchsize to prevent "undefined" error when retrieving transactions
This commit is contained in:
commit
b853268038
@ -339,7 +339,7 @@ module.exports.multiGetHistoryByAddress = async function(addresses, batchsize) {
|
||||
};
|
||||
|
||||
module.exports.multiGetTransactionByTxid = async function(txids, batchsize, verbose) {
|
||||
batchsize = batchsize || 61;
|
||||
batchsize = batchsize || 49;
|
||||
// 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
|
||||
verbose = verbose !== false;
|
||||
|
@ -83,6 +83,27 @@ describe('LegacyWallet', function() {
|
||||
}
|
||||
});
|
||||
|
||||
it.each([
|
||||
['addresses for vout missing', '1PVfrmbn1vSMoFZB2Ga7nDuXLFDyJZHrHK'],
|
||||
['txdatas were coming back null from BlueElectrum because of high batchsize', '34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo'],
|
||||
])(
|
||||
'can fetch TXs when %s',
|
||||
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 () => {
|
||||
let w = new LegacyWallet();
|
||||
w._address = '12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX';
|
||||
|
Loading…
Reference in New Issue
Block a user