diff --git a/core/src/apps/bitcoin/sign_tx/approvers.py b/core/src/apps/bitcoin/sign_tx/approvers.py index 70ae69ee52..b5645ad8bd 100644 --- a/core/src/apps/bitcoin/sign_tx/approvers.py +++ b/core/src/apps/bitcoin/sign_tx/approvers.py @@ -151,6 +151,11 @@ class BasicApprover(Approver): ) orig_fee = self.orig_total_in - self.orig_total_out + if fee < 0 or orig_fee < 0: + raise wire.ProcessError( + "Negative fees not supported in transaction replacement." + ) + # Replacement transactions are only allowed to make amendments which # do not increase the amount that we are spending on external outputs. # In other words, the total amount being sent out of the wallet must