if a network object is there but fee estimates are not available,

raise NoDynamicFeeEstimates in FeePolicy rather than in wallet.

Also, show an error message in Qt
This commit is contained in:
ThomasV
2025-03-06 12:57:05 +01:00
parent 7d8a5cc259
commit d5ee678b7f
3 changed files with 4 additions and 6 deletions
+2 -3
View File
@@ -243,13 +243,12 @@ class FeePolicy(Logger):
) -> int:
if self.method == FeeMethod.FIXED:
return self.value
if network is None and self.use_dynamic_estimates:
fee_per_kb = self.fee_per_kb(network)
if fee_per_kb is None and self.use_dynamic_estimates:
if allow_fallback_to_static_rates:
fee_per_kb = FEERATE_FALLBACK_STATIC_FEE
else:
raise NoDynamicFeeEstimates()
else:
fee_per_kb = self.fee_per_kb(network)
return self.estimate_fee_for_feerate(fee_per_kb, size)