mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
merge fixes [skip ci]
This commit is contained in:
parent
4e1b96e99b
commit
0882ba016f
6 changed files with 15 additions and 17 deletions
|
@ -355,19 +355,13 @@ class ElectrumClient {
|
|||
// }
|
||||
BehaviorSubject<Map<String, dynamic>>? tipListener;
|
||||
int? currentTip;
|
||||
Future<int?> getCurrentBlockChainTip() =>
|
||||
callWithTimeout(method: 'blockchain.headers.subscribe').then((result) {
|
||||
if (result is Map<String, dynamic>) {
|
||||
return result["height"] as int;
|
||||
}
|
||||
|
||||
Future<int?> getCurrentBlockChainTip() async {
|
||||
final method = 'blockchain.headers.subscribe';
|
||||
final cb = (result) => currentTip = result['height'] as int;
|
||||
if (tipListener == null) {
|
||||
tipListener = subscribe(id: method, method: method);
|
||||
tipListener?.listen(cb);
|
||||
cb(await call(method: method));
|
||||
callWithTimeout(method: method).then(cb);
|
||||
}
|
||||
return currentTip;
|
||||
}
|
||||
|
|
|
@ -582,14 +582,6 @@ abstract class ElectrumWalletBase
|
|||
throw BitcoinTransactionNoInputsException();
|
||||
}
|
||||
|
||||
int fee = await calcFee(
|
||||
utxos: utxos,
|
||||
outputs: outputs,
|
||||
network: network,
|
||||
memo: memo,
|
||||
feeRate: feeRate,
|
||||
);
|
||||
|
||||
return UtxoDetails(
|
||||
availableInputs: availableInputs,
|
||||
unconfirmedCoins: unconfirmedCoins,
|
||||
|
|
|
@ -325,8 +325,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
}
|
||||
|
||||
@override
|
||||
Future<void> updateUnspentCoins() async {
|
||||
await super.updateUnspentCoins();
|
||||
Future<void> updateUnspent() async {
|
||||
await super.updateUnspent();
|
||||
await checkMwebUtxosSpent();
|
||||
final mwebAddrs = (walletAddresses as LitecoinWalletAddresses).mwebAddrs;
|
||||
mwebUtxos.forEach((outputId, utxo) {
|
||||
|
|
|
@ -62,6 +62,10 @@ dev_dependencies:
|
|||
dependency_overrides:
|
||||
watcher: ^1.1.0
|
||||
protobuf: ^3.1.0
|
||||
bitcoin_base:
|
||||
git:
|
||||
url: https://github.com/cake-tech/bitcoin_base
|
||||
ref: cake-mweb
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
|
|
@ -47,6 +47,10 @@ dev_dependencies:
|
|||
|
||||
dependency_overrides:
|
||||
watcher: ^1.1.0
|
||||
bitcoin_base:
|
||||
git:
|
||||
url: https://github.com/cake-tech/bitcoin_base
|
||||
ref: cake-mweb
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
|
|
@ -140,6 +140,10 @@ dependency_overrides:
|
|||
ref: cake
|
||||
flutter_secure_storage_platform_interface: 1.0.2
|
||||
protobuf: ^3.1.0
|
||||
bitcoin_base:
|
||||
git:
|
||||
url: https://github.com/cake-tech/bitcoin_base
|
||||
ref: cake-mweb
|
||||
|
||||
flutter_icons:
|
||||
image_path: "assets/images/app_logo.png"
|
||||
|
|
Loading…
Reference in a new issue