Skip to content

Commit 0af47b4

Browse files
committed
fix: incorrect updation of from allocation grant bytes
1 parent 112380a commit 0af47b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x/subscription/keeper/msg_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func (k *Keeper) HandleMsgShareSubscription(ctx sdk.Context, msg *v3.MsgShareSub
247247
}
248248

249249
// Update sender's allocation after subtracting granted bytes
250-
fromAlloc.GrantedBytes = availableBytes.Sub(msg.Bytes)
250+
fromAlloc.GrantedBytes = grantedBytes.Sub(msg.Bytes)
251251
if fromAlloc.GrantedBytes.LT(fromAlloc.UtilisedBytes) {
252252
return nil, types.NewErrorInvalidAllocation(subscription.ID, fromAddr)
253253
}

0 commit comments

Comments
 (0)