diff --git a/x/wasm/client/rest/new_tx.go b/x/wasm/client/rest/new_tx.go index 4c973c54bc..417380c0ba 100644 --- a/x/wasm/client/rest/new_tx.go +++ b/x/wasm/client/rest/new_tx.go @@ -42,7 +42,7 @@ func setContractAdminHandlerFn(cliCtx client.Context) http.HandlerFunc { } msg := &types.MsgUpdateAdmin{ - Sender: cliCtx.GetFromAddress().String(), + Sender: req.BaseReq.From, NewAdmin: req.Admin, Contract: contractAddr, } @@ -70,7 +70,7 @@ func migrateContractHandlerFn(cliCtx client.Context) http.HandlerFunc { } msg := &types.MsgMigrateContract{ - Sender: cliCtx.GetFromAddress().String(), + Sender: req.BaseReq.From, Contract: contractAddr, CodeID: req.CodeID, MigrateMsg: req.MigrateMsg, diff --git a/x/wasm/client/rest/tx.go b/x/wasm/client/rest/tx.go index 254a530dbd..8f5e9c6931 100644 --- a/x/wasm/client/rest/tx.go +++ b/x/wasm/client/rest/tx.go @@ -107,7 +107,7 @@ func instantiateContractHandlerFn(cliCtx client.Context) http.HandlerFunc { } msg := types.MsgInstantiateContract{ - Sender: cliCtx.GetFromAddress().String(), + Sender: req.BaseReq.From, CodeID: codeID, InitFunds: req.Deposit, InitMsg: req.InitMsg, @@ -138,7 +138,7 @@ func executeContractHandlerFn(cliCtx client.Context) http.HandlerFunc { } msg := types.MsgExecuteContract{ - Sender: cliCtx.GetFromAddress().String(), + Sender: req.BaseReq.From, Contract: contractAddr, Msg: req.ExecMsg, SentFunds: req.Amount,