mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-24 20:39:21 +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:convert';
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:stackwallet/db/hive/db.dart';
|
import 'package:stackwallet/db/hive/db.dart';
|
||||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart';
|
import 'package:stackwallet/electrumx_rpc/electrumx.dart';
|
||||||
|
@ -167,8 +168,10 @@ class CachedElectrumX {
|
||||||
Set<String> cachedSerials =
|
Set<String> cachedSerials =
|
||||||
_list == null ? {} : List<String>.from(_list).toSet();
|
_list == null ? {} : List<String>.from(_list).toSet();
|
||||||
|
|
||||||
final startNumber =
|
startNumber = max(
|
||||||
cachedSerials.length - 10; // 10 being some arbitrary buffer
|
max(0, startNumber),
|
||||||
|
cachedSerials.length - 100, // 100 being some arbitrary buffer
|
||||||
|
);
|
||||||
|
|
||||||
final serials = await electrumXClient.getUsedCoinSerials(
|
final serials = await electrumXClient.getUsedCoinSerials(
|
||||||
startNumber: startNumber,
|
startNumber: startNumber,
|
||||||
|
|
Loading…
Reference in a new issue