Skip to content

Commit

Permalink
fix(nexus)!: use message RouteMessagesToRouter in the wasm msg route
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Nov 20, 2023
1 parent 4b76927 commit 1a717f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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 @@ -11,7 +11,7 @@ import (
)

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

// NewMessageRoute creates a new message route
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(request{RouteMessages: []exported.WasmMessage{exported.FromGeneralMessage(msg)}})
bz, err := json.Marshal(request{RouteMessagesToRouter: []exported.WasmMessage{exported.FromGeneralMessage(msg)}})
if err != nil {
return nil
}
Expand Down
3 changes: 1 addition & 2 deletions x/nexus/keeper/wasm_message_route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestNewMessageRoute(t *testing.T) {
assert.Empty(t, wasmK.ExecuteCalls()[0].Coins)

type req struct {
RouteMessages []nexus.WasmMessage `json:"route_messages"`
RouteMessages []nexus.WasmMessage `json:"route_messages_to_router"`
}

var actual req
Expand All @@ -97,5 +97,4 @@ func TestNewMessageRoute(t *testing.T) {
}),
).
Run(t)

}

0 comments on commit 1a717f6

Please sign in to comment.