Skip to content

Commit

Permalink
sdk: fix fuelBonusNumeratorUserStats on if
Browse files Browse the repository at this point in the history
  • Loading branch information
0xbigz committed Jul 17, 2024
1 parent d3e1f76 commit 15c99a6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sdk/src/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1030,8 +1030,11 @@ export class User {
const spotMarketAccount: SpotMarketAccount =
this.driftClient.getSpotMarketAccount(QUOTE_SPOT_MARKET_INDEX);

const fuelBonusNumeratorUserStats = now.sub(
BN.max(new BN(userStats.lastFuelIfBonusUpdateTs), FUEL_START_TS)
const fuelBonusNumeratorUserStats = BN.max(
now.sub(
BN.max(new BN(userStats.lastFuelIfBonusUpdateTs), FUEL_START_TS)
),
ZERO
);

result.insuranceFuel = result.insuranceFuel.add(
Expand Down

0 comments on commit 15c99a6

Please sign in to comment.