Skip to content

Commit 8c17a99

Browse files
committed
remove redundant typing with utils.Keys()
1 parent a87eadc commit 8c17a99

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

app/keepers/keepers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ func (appKeepers *AppKeepers) InitKeepers(
340340
appKeepers.BankKeeper,
341341
appKeepers.StakingKeeper,
342342
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
343-
utils.Keys[[]string](maccPerms),
343+
utils.Keys(maccPerms),
344344
supplyEndpointEnabled,
345345
)
346346
appKeepers.PacketForwardKeeper.SetTransferKeeper(appKeepers.TransferKeeper)

x/interchainquery/keeper/msg_server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (k msgServer) SubmitQueryResponse(goCtx context.Context, msg *types.MsgSubm
6868

6969
callbackExecuted := false
7070

71-
for _, key := range utils.Keys[types.QueryCallbacks](k.callbacks) {
71+
for _, key := range utils.Keys(k.callbacks) {
7272
module := k.callbacks[key]
7373
if module.Has(q.CallbackId) {
7474
err := module.Call(ctx, q.CallbackId, msg.Result, q)

x/interchainstaking/types/redemptions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// remove zero and potential negative values
1515
func filter(in map[string]math.Int) map[string]math.Int {
1616
out := make(map[string]math.Int)
17-
for _, v := range utils.Keys[math.Int](in) {
17+
for _, v := range utils.Keys(in) {
1818
if !in[v].IsNil() && in[v].IsPositive() {
1919
out[v] = in[v]
2020
}

x/participationrewards/keeper/distribution.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (k *Keeper) CalcTokenValues(ctx sdk.Context) (TokenValues, error) {
8484
prettyDenom0 := pool.Denoms[denoms[0]].Denom
8585
prettyDenom1 := pool.Denoms[denoms[1]].Denom
8686

87-
for _, ibcDenom := range utils.Keys(pool.Denoms) {
87+
for _, ibcDenom := range denoms {
8888
if _, ok := graph[pool.Denoms[ibcDenom].Denom]; !ok {
8989
graph[pool.Denoms[ibcDenom].Denom] = make(map[string][]sdk.Dec)
9090
}
@@ -144,7 +144,7 @@ func (k *Keeper) CalcTokenValues(ctx sdk.Context) (TokenValues, error) {
144144
prettyDenom0 := pool.Denoms[denoms[0]].Denom
145145
prettyDenom1 := pool.Denoms[denoms[1]].Denom
146146

147-
for _, ibcDenom := range utils.Keys(pool.Denoms) {
147+
for _, ibcDenom := range denoms {
148148
if _, ok := graph[pool.Denoms[ibcDenom].Denom]; !ok {
149149
graph[pool.Denoms[ibcDenom].Denom] = make(map[string][]sdk.Dec)
150150
}

0 commit comments

Comments
 (0)