Skip to content

Commit

Permalink
fix: properly add delegation rewards in account assets query (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler authored Jul 3, 2024
1 parent 64a31fc commit e8cb38d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/query/keeper/grpc_account_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (k Keeper) AccountAssets(goCtx context.Context, req *types.QueryAccountAsse
staker := string(delegatorIterator.Key()[0:43])

response.ProtocolDelegation += k.delegationKeeper.GetDelegationAmountOfDelegator(ctx, staker, req.Address)
response.ProtocolRewards.Add(k.delegationKeeper.GetOutstandingRewards(ctx, staker, req.Address)...)
response.ProtocolRewards = response.ProtocolRewards.Add(k.delegationKeeper.GetOutstandingRewards(ctx, staker, req.Address)...)
}

// ======================================================
Expand Down

0 comments on commit e8cb38d

Please sign in to comment.