Skip to content

Commit c595b64

Browse files
committed
fix: remove negative fee assert from get_tx_fee_warning
rm the `assert fee >= 0, f"{fee=!r} must be non-negative satoshis"` from `Abstract_Wallet.get_tx_fee_warning()` to prevent an exception when users load a psbt with negative tx fee.
1 parent 8eb3c43 commit c595b64

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

electrum/wallet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3322,7 +3322,6 @@ def get_tx_fee_warning(
33223322
txid: Optional[str]) -> Optional[Tuple[bool, str, str]]:
33233323

33243324
assert invoice_amt >= 0, f"{invoice_amt=!r} must be non-negative satoshis"
3325-
assert fee >= 0, f"{fee=!r} must be non-negative satoshis"
33263325
is_future_tx = txid is not None and txid in self.adb.future_tx
33273326
feerate = Decimal(fee) / tx_size # sat/byte
33283327
fee_ratio = Decimal(fee) / invoice_amt if invoice_amt else 0

0 commit comments

Comments
 (0)