fix dogecoin absurd fees send error

This commit is contained in:
julian 2024-01-17 11:12:36 -06:00
parent 04a5f47d52
commit 4301ba96e5
2 changed files with 6 additions and 0 deletions

View file

@ -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;

View file

@ -31,6 +31,8 @@ mixin ElectrumXInterface<T extends Bip39HDCurrency> on Bip39HDWallet<T> {
late ElectrumXClient electrumXClient;
late CachedElectrumXClient electrumXCachedClient;
int? get maximumFeerate => null;
static const _kServerBatchCutoffVersion = [1, 6];
List<int>? _serverVersion;
bool get serverCanBatch {
@ -678,6 +680,7 @@ mixin ElectrumXInterface<T extends Bip39HDCurrency> on Bip39HDWallet<T> {
scriptHash: cryptoCurrency.networkParams.p2shPrefix,
wif: cryptoCurrency.networkParams.wifPrefix,
),
maximumFeeRate: maximumFeerate,
);
const version = 1; // TODO possibly override this for certain coins?
txb.setVersion(version);