Skip to content

Commit

Permalink
rename req to request
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Nov 13, 2023
1 parent e9d92af commit b353989
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions x/nexus/keeper/msg_dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (

var _ wasmkeeper.Messenger = (*Messenger)(nil)

type request = exported.WasmMessage

type Messenger struct {
types.Nexus
}
Expand All @@ -32,7 +30,7 @@ func NewMessenger(nexus types.Nexus) Messenger {

// DispatchMsg decodes the messages from the cosmowasm gateway and routes them to the nexus module if possible
func (m Messenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, _ string, msg wasmvmtypes.CosmosMsg) (events []sdk.Event, data [][]byte, err error) {
req := request{}
req := exported.WasmMessage{}
if err := json.Unmarshal(msg.Custom, &req); err != nil {
return nil, nil, sdkerrors.Wrap(wasmtypes.ErrUnknownMsg, err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions x/nexus/keeper/wasm_message_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
types "github.com/axelarnetwork/axelar-core/x/nexus/types"
)

type req struct {
type request struct {
RouteMessages []exported.WasmMessage `json:"route_messages"`
}

Expand All @@ -26,7 +26,7 @@ func NewMessageRoute(nexus types.Nexus, account types.AccountKeeper, wasm types.
return fmt.Errorf("gateway is not set")
}

bz, err := json.Marshal(req{RouteMessages: []exported.WasmMessage{exported.FromGeneralMessage(msg)}})
bz, err := json.Marshal(request{RouteMessages: []exported.WasmMessage{exported.FromGeneralMessage(msg)}})
if err != nil {
return nil
}
Expand Down

0 comments on commit b353989

Please sign in to comment.