adjusted the default derivation path for the test cases to planetmint… (#59)

* adjusted the default derivation path for the test cases to planetmint cointype

* [test] Update sample.PubKey

Changed due to updated derivation path.

* [test] Set comment for DefaultDerivationPath

---------

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Co-authored-by: Julian Strobl <jmastr@mailbox.org>
This commit is contained in:
Jürgen Eckel 2023-08-03 09:48:03 +02:00 committed by GitHub
parent 9ea8a64fbb
commit 1a5d673a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,6 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
@ -42,7 +41,7 @@ func (s *E2ETestSuite) SetupSuite() {
val := s.network.Validators[0]
kb := val.ClientCtx.Keyring
account, err := kb.NewAccount(sample.Name, sample.Mnemonic, keyring.DefaultBIP39Passphrase, sdk.FullFundraiserPath, hd.Secp256k1)
account, err := kb.NewAccount(sample.Name, sample.Mnemonic, keyring.DefaultBIP39Passphrase, sample.DefaultDerivationPath, hd.Secp256k1)
s.Require().NoError(err)
addr, _ := account.GetAddress()

View File

@ -14,8 +14,6 @@ import (
bank "github.com/cosmos/cosmos-sdk/x/bank/client/cli"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
sdk "github.com/cosmos/cosmos-sdk/types"
)
// E2ETestSuite struct definition of machine suite
@ -39,7 +37,7 @@ func (s *E2ETestSuite) SetupSuite() {
val := s.network.Validators[0]
kb := val.ClientCtx.Keyring
account, err := kb.NewAccount(sample.Name, sample.Mnemonic, keyring.DefaultBIP39Passphrase, sdk.FullFundraiserPath, hd.Secp256k1)
account, err := kb.NewAccount(sample.Name, sample.Mnemonic, keyring.DefaultBIP39Passphrase, sample.DefaultDerivationPath, hd.Secp256k1)
s.Require().NoError(err)
addr, _ := account.GetAddress()

View File

@ -18,7 +18,7 @@ import (
const Mnemonic = "helmet hedgehog lab actor weekend elbow pelican valid obtain hungry rocket decade tower gallery fit practice cart cherry giggle hair snack glance bulb farm"
// PubKey corresponding public key to sample mnemonic
const PubKey = "02328de87896b9cbb5101c335f40029e4be898988b470abbf683f1a0b318d73470"
const PubKey = "021cd2a59c6f9402ce09effba89b3deb6bb5863733e625f22c06204918061db4f0"
// Name is the name of the sample machine to use in tests
const Name = "machine"
@ -29,6 +29,9 @@ const Amount = "1000stake"
// Fees is the amount of fees to use in tests
const Fees = "2stake"
// DefaultDerivationPath is the BIP44Prefix for PLMNT (see https://github.com/satoshilabs/slips/blob/master/slip-0044.md)
const DefaultDerivationPath = "m/44'/8680'/0'/0/0"
// KeyPair returns a sample private / public keypair
func KeyPair() (string, string) {
secret := "Don't tell anybody"