From 974b38b785f69647a2dc6d6033b8b4da46b4565b Mon Sep 17 00:00:00 2001 From: MalteHerrmann Date: Fri, 2 Aug 2024 22:14:30 +0200 Subject: [PATCH] use example chain ID in wallet tests --- wallets/ledger/ledger_suite_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wallets/ledger/ledger_suite_test.go b/wallets/ledger/ledger_suite_test.go index 123bf754..6431be73 100644 --- a/wallets/ledger/ledger_suite_test.go +++ b/wallets/ledger/ledger_suite_test.go @@ -5,6 +5,7 @@ package ledger_test import ( "encoding/hex" + "fmt" "regexp" "testing" @@ -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" @@ -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" @@ -82,7 +84,7 @@ func (suite *LedgerTestSuite) getMockTxAmino() []byte { } }], "sequence":"6" - }`, + }`, testutil.ExampleChainID), "", ) @@ -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)