From 5298410a9f87dbeaa31007b4e53c230075c3bbb7 Mon Sep 17 00:00:00 2001 From: rapha Date: Thu, 5 Oct 2023 17:01:02 +0200 Subject: [PATCH] fix: todo in queries --- x/query/keeper/grpc_account_assets.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/x/query/keeper/grpc_account_assets.go b/x/query/keeper/grpc_account_assets.go index f02ca20f..bb62d192 100644 --- a/x/query/keeper/grpc_account_assets.go +++ b/x/query/keeper/grpc_account_assets.go @@ -73,11 +73,10 @@ func (k Keeper) AccountAssets(goCtx context.Context, req *types.QueryAccountAsse // ProtocolFunding // =============== - // Iterate all pools and look if the user is funding - // TODO(rapha): fix this - //for _, pool := range k.poolKeeper.GetAllPools(ctx) { - // response.ProtocolFunding += pool.GetFunderAmount(req.Address) - //} + // Iterate all fundings of the user to get total funding amount + for _, funding := range k.fundersKeeper.GetFundingsOfFunder(ctx, req.Address) { + response.ProtocolFunding += funding.Amount + } return &response, nil }