mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-24 12:29:37 +00:00
firo used serials cached electrumx fix
This commit is contained in:
parent
c51ccd33ac
commit
747565fa16
1 changed files with 5 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:stackwallet/db/hive/db.dart';
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart';
|
||||
|
@ -167,8 +168,10 @@ class CachedElectrumX {
|
|||
Set<String> cachedSerials =
|
||||
_list == null ? {} : List<String>.from(_list).toSet();
|
||||
|
||||
final startNumber =
|
||||
cachedSerials.length - 10; // 10 being some arbitrary buffer
|
||||
startNumber = max(
|
||||
max(0, startNumber),
|
||||
cachedSerials.length - 100, // 100 being some arbitrary buffer
|
||||
);
|
||||
|
||||
final serials = await electrumXClient.getUsedCoinSerials(
|
||||
startNumber: startNumber,
|
||||
|
|
Loading…
Reference in a new issue