Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Feb 22, 2024
1 parent 0bb7787 commit b9eecfd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ func NewNoisApp(
},
keeper: app.IBCKeeper,
WasmConfig: &wasmConfig,
TXCounterStoreKey: keys[wasm.StoreKey],
TXCounterStoreKey: keys[wasmtypes.StoreKey],
Codec: app.appCodec,
govKeeper: app.GovKeeper,
},
Expand Down
15 changes: 12 additions & 3 deletions app/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ func (app *NoisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
feePool.CommunityPool = feePool.CommunityPool.Add(scraps...)
app.DistrKeeper.SetFeePool(ctx, feePool)

app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())
err := app.DistrKeeper.Hooks().AfterValidatorCreated(ctx, val.GetOperator())
if err != nil {
panic(err)
}
return false
})

Expand All @@ -124,8 +127,14 @@ func (app *NoisApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddrs [
if err != nil {
panic(err)
}
app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr)
app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr)
err = app.DistrKeeper.Hooks().BeforeDelegationCreated(ctx, delAddr, valAddr)
if err != nil {
panic(err)
}
err = app.DistrKeeper.Hooks().AfterDelegationModified(ctx, delAddr, valAddr)
if err != nil {
panic(err)
}
}

// reset context height
Expand Down
5 changes: 2 additions & 3 deletions app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package app
import (
"encoding/json"

"github.com/CosmWasm/wasmd/x/wasm"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/codec"
)
Expand All @@ -12,12 +11,12 @@ type GenesisState map[string]json.RawMessage

func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState {
genesis := ModuleBasics.DefaultGenesis(cdc)
wasmGen := wasm.GenesisState{
wasmGen := wasmtypes.GenesisState{
Params: wasmtypes.Params{
CodeUploadAccess: wasmtypes.AllowNobody,
InstantiateDefaultPermission: wasmtypes.AccessTypeEverybody,
},
}
genesis[wasm.ModuleName] = cdc.MustMarshalJSON(&wasmGen)
genesis[wasmtypes.ModuleName] = cdc.MustMarshalJSON(&wasmGen)
return genesis
}

0 comments on commit b9eecfd

Please sign in to comment.