Skip to content

Commit

Permalink
fix: properly add delegation rewards in account assets query
Browse files Browse the repository at this point in the history
  • Loading branch information
troykessler committed Jun 18, 2024
1 parent 94719ab commit d3a3b28
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 d3a3b28

Please sign in to comment.