Skip to content

Commit

Permalink
use example chain ID in wallet tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteHerrmann committed Aug 2, 2024
1 parent b38681a commit 974b38b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions wallets/ledger/ledger_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package ledger_test

import (
"encoding/hex"
"fmt"
"regexp"
"testing"

Expand All @@ -21,6 +22,7 @@ import (
auxTx "github.com/cosmos/cosmos-sdk/x/auth/tx"
bankTypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/evmos/os/testutil"
"github.com/evmos/os/wallets/ledger"
"github.com/evmos/os/wallets/ledger/mocks"
"github.com/evmos/os/wallets/usbwallet"
Expand Down Expand Up @@ -64,10 +66,10 @@ func (suite *LedgerTestSuite) newPubKey(pk string) (res cryptoTypes.PubKey) {

func (suite *LedgerTestSuite) getMockTxAmino() []byte {
whitespaceRegex := regexp.MustCompile(`\s+`)
tmp := whitespaceRegex.ReplaceAllString(
tmp := whitespaceRegex.ReplaceAllString(fmt.Sprintf(
`{
"account_number": "0",
"chain_id":"evmos_9000-1",
"chain_id":"%s",
"fee":{
"amount":[{"amount":"150","denom":"atom"}],
"gas":"20000"
Expand All @@ -82,7 +84,7 @@ func (suite *LedgerTestSuite) getMockTxAmino() []byte {
}
}],
"sequence":"6"
}`,
}`, testutil.ExampleChainID),
"",
)

Expand Down Expand Up @@ -146,7 +148,7 @@ func (suite *LedgerTestSuite) getMockTxProtobuf() []byte {
signBytes, err := auxTx.DirectSignBytes(
bodyBytes,
authInfoBytes,
"evmos_9000-1",
testutil.ExampleChainID,
0,
)
suite.Require().NoError(err)
Expand Down

0 comments on commit 974b38b

Please sign in to comment.