fetch accurate fee rates from Cake's mempool api (#1649)

* fetch accurate fee rates from mempool api

* remove duplicate exception handler onError call [skip ci]

* add the domain name
This commit is contained in:
Omar Hatem
2024-08-26 20:07:25 +03:00
committed by GitHub
parent ce21098e98
commit 518bfbe40d
36 changed files with 239 additions and 46 deletions
@@ -1,3 +1,4 @@
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
import 'package:cake_wallet/entities/exchange_api_mode.dart';
import 'package:cake_wallet/ethereum/ethereum.dart';
@@ -75,6 +76,9 @@ abstract class PrivacySettingsViewModelBase with Store {
@computed
bool get useTronGrid => _settingsStore.useTronGrid;
@computed
bool get useMempoolFeeAPI => _settingsStore.useMempoolFeeAPI;
@computed
bool get lookupTwitter => _settingsStore.lookupsTwitter;
@@ -99,6 +103,8 @@ abstract class PrivacySettingsViewModelBase with Store {
bool get canUseTronGrid => _wallet.type == WalletType.tron;
bool get canUseMempoolFeeAPI => _wallet.type == WalletType.bitcoin;
@action
void setShouldSaveRecipientAddress(bool value) =>
_settingsStore.shouldSaveRecipientAddress = value;
@@ -156,4 +162,9 @@ abstract class PrivacySettingsViewModelBase with Store {
_settingsStore.useTronGrid = value;
tron!.updateTronGridUsageState(_wallet, value);
}
@action
void setUseMempoolFeeAPI(bool value) {
_settingsStore.useMempoolFeeAPI = value;
}
}