Skip to content

Commit

Permalink
test: fix hui's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
loloicci committed Aug 23, 2023
1 parent d272fa7 commit 1379de2
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions x/wasm/keeper/msg_server_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,21 @@ func TestUpdateAdmin(t *testing.T) {
// setup
storeMsg := types.MsgStoreCodeFixture(func(m *types.MsgStoreCode) {
m.WASMByteCode = wasmContract
m.Sender = sender.String()
m.Sender = myAddress.String()
})
}
rsp, err := wasmApp.MsgServiceRouter().Handler(storeMsg)(ctx, storeMsg)
require.NoError(t, err)
var storeCodeResult types.MsgStoreCodeResponse
require.NoError(t, wasmApp.AppCodec().Unmarshal(rsp.Data, &storeCodeResult))
codeID := storeCodeResult.CodeID

initMsg :=types.MsgInstantiateContractFixture(func(m *types.MsgInstantiateContract) {
Sender: myAddress.String(),
Admin: myAddress.String(),
CodeID: codeID,
Label: "test",
Msg: []byte(`{}`),
Funds: sdk.Coins{},
}
initMsg := types.MsgInstantiateContractFixture(func(m *types.MsgInstantiateContract) {
m.Sender = myAddress.String()
m.Admin = myAddress.String()
m.CodeID = codeID
m.Msg = []byte(`{}`)
m.Funds = sdk.Coins{}
})
rsp, err = wasmApp.MsgServiceRouter().Handler(initMsg)(ctx, initMsg)
require.NoError(t, err)

Expand Down

0 comments on commit 1379de2

Please sign in to comment.