Skip to content

Commit

Permalink
fix: wrong test cases
Browse files Browse the repository at this point in the history
Regardless of whether it’s OWNER_EXTERNAL or OWNER_MODULE, both indexes are being managed.
  • Loading branch information
zsystm committed Jul 17, 2024
1 parent f1fe6ff commit 0927856
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions x/erc20/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/suite"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -53,6 +54,10 @@ var (
customERC20,
}
denomIdxs = []types.TokenPairDenomIndex{
{
Denom: customERC20.Denom,
TokenPairId: customERC20.GetID(),
},
{
Denom: uqstars,
// denomIdx must have latest token pair id
Expand All @@ -61,10 +66,19 @@ var (
},
}
erc20AddrIdxs = []types.TokenPairERC20AddressIndex{
{
Erc20Address: common.HexToAddress(uqstars1.Erc20Address).Bytes(),
TokenPairId: uqstars2.GetID(),
},
{
Erc20Address: customERC20.GetERC20Contract().Bytes(),
TokenPairId: customERC20.GetID(),
},

{
Erc20Address: common.HexToAddress(uqstars2.Erc20Address).Bytes(),
TokenPairId: uqstars2.GetID(),
},
}
)

Expand Down

0 comments on commit 0927856

Please sign in to comment.