add name param to query (#689)

This commit is contained in:
Denali Marsh 2020-10-14 16:34:31 +02:00 committed by GitHub
parent 9a389e0a0f
commit 6e6ed69383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ func queryGetModAccounts(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]by
} }
var accs []supplyexported.ModuleAccountI var accs []supplyexported.ModuleAccountI
if len(params.Name) > 0 { if len(params.Name) > 0 {
acc := k.supplyKeeper.GetModuleAccount(ctx, types.LPAccount) acc := k.supplyKeeper.GetModuleAccount(ctx, params.Name)
accs = append(accs, acc) accs = append(accs, acc)
} else { } else {
acc := k.supplyKeeper.GetModuleAccount(ctx, types.ModuleAccountName) acc := k.supplyKeeper.GetModuleAccount(ctx, types.ModuleAccountName)