qt tx dlg: fix showing fee warnings
In qt, only the confirm_tx_dialog was showing the fee warnings, the transaction_dialog was not...
regression from bc3946d2f4
This commit is contained in:
@@ -905,7 +905,7 @@ class TxDialog(QDialog, MessageBoxMixin):
|
|||||||
fee_rate = Decimal(fee) / size # sat/byte
|
fee_rate = Decimal(fee) / size # sat/byte
|
||||||
fee_str += ' ( %s ) ' % self.main_window.format_fee_rate(fee_rate * 1000)
|
fee_str += ' ( %s ) ' % self.main_window.format_fee_rate(fee_rate * 1000)
|
||||||
if isinstance(self.tx, PartialTransaction):
|
if isinstance(self.tx, PartialTransaction):
|
||||||
invoice_amt = amount
|
invoice_amt = abs(amount)
|
||||||
fee_warning_tuple = self.wallet.get_tx_fee_warning(
|
fee_warning_tuple = self.wallet.get_tx_fee_warning(
|
||||||
invoice_amt=invoice_amt, tx_size=size, fee=fee)
|
invoice_amt=invoice_amt, tx_size=size, fee=fee)
|
||||||
if fee_warning_tuple:
|
if fee_warning_tuple:
|
||||||
|
|||||||
@@ -3175,6 +3175,8 @@ class Abstract_Wallet(ABC, Logger, EventListener):
|
|||||||
tx_size: int,
|
tx_size: int,
|
||||||
fee: int) -> Optional[Tuple[bool, str, str]]:
|
fee: int) -> Optional[Tuple[bool, str, str]]:
|
||||||
|
|
||||||
|
assert invoice_amt >= 0, f"{invoice_amt=!r} must be non-negative satoshis"
|
||||||
|
assert fee >= 0, f"{fee=!r} must be non-negative satoshis"
|
||||||
feerate = Decimal(fee) / tx_size # sat/byte
|
feerate = Decimal(fee) / tx_size # sat/byte
|
||||||
fee_ratio = Decimal(fee) / invoice_amt if invoice_amt else 0
|
fee_ratio = Decimal(fee) / invoice_amt if invoice_amt else 0
|
||||||
long_warning = None
|
long_warning = None
|
||||||
|
|||||||
Reference in New Issue
Block a user