Skip to content

Commit

Permalink
fix: session max bytes in subscription module
Browse files Browse the repository at this point in the history
  • Loading branch information
ironman0x7b2 committed Jan 12, 2025
1 parent f6e1cf9 commit c78296a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/subscription/keeper/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func (k *Keeper) UpdateSessionMaxValues(ctx sdk.Context, session sessiontypes.Se
}

// Calculate the maximum allowable session bytes and duration
maxBytes := alloc.GrantedBytes.Sub(alloc.UtilisedBytes)
diffBytes := alloc.GrantedBytes.Sub(alloc.UtilisedBytes)
maxBytes := s.Bytes().Add(diffBytes)
maxDuration := subscription.InactiveAt.Sub(s.StartAt)

// Update the session with calculated max bytes and duration
Expand Down

0 comments on commit c78296a

Please sign in to comment.