Skip to content

Commit 732f378

Browse files
janezpodhostnikjoshuahannan
authored andcommitted
Fix transaction fees underflow
1 parent 751cb29 commit 732f378

File tree

3 files changed

+33
-15
lines changed

3 files changed

+33
-15
lines changed

contracts/FlowStorageFees.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub contract FlowStorageFees {
9797
.borrow() {
9898
if accountAddress == payer {
9999
// if the account is the payer, deduct the maximum possible transaction fees from the balance
100-
balance = balanceRef.balance - maxTxFees
100+
balance = balanceRef.balance.saturatingSubtract(maxTxFees)
101101
} else {
102102
balance = balanceRef.balance
103103
}

lib/go/contracts/internal/assets/assets.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)