Skip to content

Commit

Permalink
fixup! Rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
kim committed Aug 10, 2023
1 parent 387dcea commit 288dc1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/standalone/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl spacetimedb_client_api::ControlStateWriteAccess for StandaloneEnv {
let mut balance = <Self as spacetimedb_client_api::ControlStateReadAccess>::get_energy_balance(self, identity)?
.map(|quanta| quanta.0)
.unwrap_or(0);
balance = balance.saturating_add(amount.0.try_into().unwrap_or(i128::MAX));
balance = balance.saturating_add(amount.0);

self.control_db.set_energy_balance(*identity, EnergyQuanta(balance))
}
Expand Down

0 comments on commit 288dc1d

Please sign in to comment.