Skip to content

Commit

Permalink
Merge pull request #761 from MutinyWallet/sat-sub-balance-remaining
Browse files Browse the repository at this point in the history
Use saturating_sub in budget_remaining
  • Loading branch information
TonyGiorgio authored Sep 16, 2023
2 parents ee73c38 + 3df50d4 commit d200111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mutiny-core/src/nostr/nwc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl BudgetedSpendingConditions {

pub fn budget_remaining(&self) -> u64 {
let mut clone = self.clone();
self.budget - clone.sum_payments()
self.budget.saturating_sub(clone.sum_payments())
}
}

Expand Down

0 comments on commit d200111

Please sign in to comment.