From 4301ba96e56440d030f063877a4aa2d8ccf18910 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 17 Jan 2024 11:12:36 -0600 Subject: [PATCH] fix dogecoin absurd fees send error --- lib/wallets/wallet/impl/dogecoin_wallet.dart | 3 +++ .../wallet/wallet_mixin_interfaces/electrumx_interface.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/wallets/wallet/impl/dogecoin_wallet.dart b/lib/wallets/wallet/impl/dogecoin_wallet.dart index 2d21572f4..210ca64cd 100644 --- a/lib/wallets/wallet/impl/dogecoin_wallet.dart +++ b/lib/wallets/wallet/impl/dogecoin_wallet.dart @@ -17,6 +17,9 @@ class DogecoinWallet extends Bip39HDWallet with ElectrumXInterface, CoinControlInterface { DogecoinWallet(CryptoCurrencyNetwork network) : super(Dogecoin(network)); + @override + int get maximumFeerate => 2500000; // 1000x default value + @override int get isarTransactionVersion => 2; diff --git a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart index 4257c0f7c..1f425d498 100644 --- a/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart +++ b/lib/wallets/wallet/wallet_mixin_interfaces/electrumx_interface.dart @@ -31,6 +31,8 @@ mixin ElectrumXInterface on Bip39HDWallet { late ElectrumXClient electrumXClient; late CachedElectrumXClient electrumXCachedClient; + int? get maximumFeerate => null; + static const _kServerBatchCutoffVersion = [1, 6]; List? _serverVersion; bool get serverCanBatch { @@ -678,6 +680,7 @@ mixin ElectrumXInterface on Bip39HDWallet { scriptHash: cryptoCurrency.networkParams.p2shPrefix, wif: cryptoCurrency.networkParams.wifPrefix, ), + maximumFeeRate: maximumFeerate, ); const version = 1; // TODO possibly override this for certain coins? txb.setVersion(version);