Skip to content

Commit

Permalink
fix(wasm)!: fix type interface conversion (#2192)
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth authored Oct 14, 2024
1 parent 5d08029 commit 22563b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions x/nexus/keeper/wasmer_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ func NewWasmerEngine(inner wasmtypes.WasmerEngine, msgIDGenerator types.MsgIDGen
}

func getCtx(querier wasmvm.Querier) sdk.Context {
// wasmd passes a reference to the querier only for the Migrate method
// https://github.com/CosmWasm/wasmd/blob/21ec15a5c025bc0fa8c634691dc839ab77b9a7d2/x/wasm/keeper/keeper.go#L433
if querier, ok := querier.(*wasmkeeper.QueryHandler); ok {
return querier.Ctx
}

return querier.(wasmkeeper.QueryHandler).Ctx
}

Expand Down

0 comments on commit 22563b8

Please sign in to comment.