From 7ddc0e8f0aa334308da4cea1ca60e9197953880c Mon Sep 17 00:00:00 2001 From: overtorment Date: Thu, 28 Sep 2023 20:15:40 +0100 Subject: [PATCH] FIX: incorrect fees occasionally (for some electrum servers); better fee estimation --- models/networkTransactionFees.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/networkTransactionFees.ts b/models/networkTransactionFees.ts index f1f0b168e..773e2590f 100644 --- a/models/networkTransactionFees.ts +++ b/models/networkTransactionFees.ts @@ -10,6 +10,10 @@ export const NetworkTransactionFeeType = Object.freeze({ export class NetworkTransactionFee { static StorageKey = 'NetworkTransactionFee'; + private fastestFee: number; + private mediumFee: number; + private slowFee: number; + constructor(fastestFee = 2, mediumFee = 1, slowFee = 1) { this.fastestFee = fastestFee; this.mediumFee = mediumFee; @@ -18,7 +22,7 @@ export class NetworkTransactionFee { } export default class NetworkTransactionFees { - static recommendedFees() { + static recommendedFees(): Promise { // eslint-disable-next-line no-async-promise-executor return new Promise(async resolve => { try {