mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Fix electrum unspent coins error (#1912)
* Refresh unspent coins before creating a transaction * disable seed verification in debug mode [skip ci]
This commit is contained in:
parent
4cdee649d1
commit
214fc7113c
4 changed files with 13 additions and 5 deletions
|
@ -4,7 +4,6 @@ import 'dart:io';
|
|||
import 'dart:isolate';
|
||||
|
||||
import 'package:bitcoin_base/bitcoin_base.dart';
|
||||
import 'package:cw_bitcoin/litecoin_wallet_addresses.dart';
|
||||
import 'package:cw_core/utils/print_verbose.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_wallet.dart';
|
||||
import 'package:cw_bitcoin/litecoin_wallet.dart';
|
||||
|
@ -991,6 +990,9 @@ abstract class ElectrumWalletBase
|
|||
@override
|
||||
Future<PendingTransaction> createTransaction(Object credentials) async {
|
||||
try {
|
||||
// start by updating unspent coins
|
||||
await updateAllUnspents();
|
||||
|
||||
final outputs = <BitcoinOutput>[];
|
||||
final transactionCredentials = credentials as BitcoinTransactionCredentials;
|
||||
final hasMultiDestination = transactionCredentials.outputs.length > 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue