mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
zero conf possible null fix
This commit is contained in:
parent
da8972e27b
commit
9974f60b4c
1 changed files with 9 additions and 1 deletions
|
@ -2413,7 +2413,15 @@ class BitcoinCashWallet extends CoinServiceAPI
|
|||
// don't care about sorting if using all utxos
|
||||
if (!coinControl) {
|
||||
// sort spendable by age (oldest first)
|
||||
spendableOutputs.sort((a, b) => b.blockTime!.compareTo(a.blockTime!));
|
||||
spendableOutputs.sort((a, b) {
|
||||
if (a.blockTime != null && b.blockTime != null) {
|
||||
return b.blockTime!.compareTo(a.blockTime!);
|
||||
} else if (a.blockTime != null) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Logging.instance.log("spendableOutputs.length: ${spendableOutputs.length}",
|
||||
|
|
Loading…
Reference in a new issue