Skip to content

Commit

Permalink
rename and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Nov 7, 2023
1 parent 45b22e6 commit 80c3b77
Show file tree
Hide file tree
Showing 11 changed files with 145 additions and 300 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ func NewAxelarApp(

// TODO: fix this
// messageRouter := nexusTypes.NewMessageRouter().
// AddRoute(evmTypes.ModuleName, evmKeeper.NewMessageRouter()).
// AddRoute(axelarnetTypes.ModuleName, axelarnetKeeper.NewMessageRouter(ibcK, axelarnetK, feegrantK, axelarbankkeeper.NewBankKeeper(bankK), nexusK, accountK))
// AddRoute(evmTypes.ModuleName, evmKeeper.NewMessageRoute()).
// AddRoute(axelarnetTypes.ModuleName, axelarnetKeeper.NewMessageRoute(ibcK, axelarnetK, feegrantK, axelarbankkeeper.NewBankKeeper(bankK), nexusK, accountK))
// nexusK.SetMessageRouter(messageRouter)

// Create static IBC router, add axelarnet module as the IBC transfer route, and seal it
Expand Down
4 changes: 0 additions & 4 deletions x/axelarnet/keeper/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ func randomChains() []types.CosmosChain {
return chains
}

func randomNormalizedStr(min, max int) string {
return strings.ReplaceAll(utils.NormalizeString(rand.StrBetween(min, max)), utils.DefaultDelimiter, "-")
}

// randomTransferQueue returns a random (valid) transfer queue state for testing
func randomTransferQueue(cdc codec.Codec, transfers []types.IBCTransfer) utils.QueueState {
qs := utils.QueueState{Items: make(map[string]utils.QueueState_Item)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import (

const gasCost = storetypes.Gas(1000000)

func NewMessageRouter(
ibcK IBCKeeper,
func NewMessageRoute(
keeper Keeper,
ibcK types.IBCKeeper,
feegrantK types.FeegrantKeeper,
bankK types.BankKeeper,
nexusK types.Nexus,
accountK types.AccountKeeper,
) nexus.MessageRouter {
) nexus.MessageRoute {
return func(ctx sdk.Context, routingCtx nexus.RoutingContext, msg nexus.GeneralMessage) error {
if routingCtx.Payload == nil {
return fmt.Errorf("payload is required for routing messages to a cosmos chain")
Expand Down
16 changes: 16 additions & 0 deletions x/axelarnet/keeper/message_route_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package keeper_test

import (
"testing"

. "github.com/axelarnetwork/utils/test"

Check failure on line 6 in x/axelarnet/keeper/message_route_test.go

View workflow job for this annotation

GitHub Actions / test (1.21, ubuntu-20.04)

"github.com/axelarnetwork/utils/test" imported and not used
)

func TestNewMessageRoute(t *testing.T) {
// var (
// route nexus.MessageRoute
// )

// givenMessageRoute := Given("the message route", func() {
// })
}
Loading

0 comments on commit 80c3b77

Please sign in to comment.