mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Generic fixes (#1619)
* update fee rates * periodically update fees * minor enhancements * minor enhancements * some improvements add solana node * handle empty hex as null * minor improvement * fix imports * fix app hanging on splash screen * update app versions temporarily disable sign/verify for hardware wallets
This commit is contained in:
parent
7c9b72483a
commit
c59d39d42d
23 changed files with 89 additions and 92 deletions
|
@ -264,7 +264,8 @@ abstract class ElectrumWalletBase
|
|||
void Function(FlutterErrorDetails)? _onError;
|
||||
Timer? _reconnectTimer;
|
||||
Timer? _autoSaveTimer;
|
||||
static const int _autoSaveInterval = 30;
|
||||
Timer? _updateFeeRateTimer;
|
||||
static const int _autoSaveInterval = 1;
|
||||
|
||||
Future<void> init() async {
|
||||
await walletAddresses.init();
|
||||
|
@ -272,7 +273,7 @@ abstract class ElectrumWalletBase
|
|||
await save();
|
||||
|
||||
_autoSaveTimer =
|
||||
Timer.periodic(Duration(seconds: _autoSaveInterval), (_) async => await save());
|
||||
Timer.periodic(Duration(minutes: _autoSaveInterval), (_) async => await save());
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -425,6 +426,10 @@ abstract class ElectrumWalletBase
|
|||
await updateTransactions();
|
||||
await updateAllUnspents();
|
||||
await updateBalance();
|
||||
updateFeeRates();
|
||||
|
||||
_updateFeeRateTimer ??=
|
||||
Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates());
|
||||
|
||||
if (alwaysScan == true) {
|
||||
_setListeners(walletInfo.restoreHeight);
|
||||
|
@ -1213,6 +1218,7 @@ abstract class ElectrumWalletBase
|
|||
await electrumClient.close();
|
||||
} catch (_) {}
|
||||
_autoSaveTimer?.cancel();
|
||||
_updateFeeRateTimer?.cancel();
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -1371,7 +1377,7 @@ abstract class ElectrumWalletBase
|
|||
|
||||
if (confirmations > 0) return false;
|
||||
|
||||
if (transactionHex == null) {
|
||||
if (transactionHex == null || transactionHex.isEmpty) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue