diff --git a/gno.land/pkg/gnoclient/example_test.go b/gno.land/pkg/gnoclient/example_test.go index a1be4481d2b..ed6bd758321 100644 --- a/gno.land/pkg/gnoclient/example_test.go +++ b/gno.land/pkg/gnoclient/example_test.go @@ -33,7 +33,8 @@ func Example_withInMemCrypto() { bip39Passphrase := "" account := uint32(0) index := uint32(0) - signer, _ := gnoclient.SignerFromBip39(mnemo, bip39Passphrase, account, index) + chainID := "dev" + signer, _ := gnoclient.SignerFromBip39(chainID, mnemo, bip39Passphrase, account, index) remote := "127.0.0.1:26657" rpcClient := rpcclient.NewHTTP(remote, "/websocket") diff --git a/gno.land/pkg/gnoclient/signer.go b/gno.land/pkg/gnoclient/signer.go index 5eba124f2a8..e08c852c803 100644 --- a/gno.land/pkg/gnoclient/signer.go +++ b/gno.land/pkg/gnoclient/signer.go @@ -124,7 +124,7 @@ var _ Signer = (*SignerFromKeybase)(nil) // This can be useful in scenarios where storing private keys in the filesystem isn't feasible. // // Warning: Using keys.NewKeyBaseFromDir is recommended where possible, as it is more secure. -func SignerFromBip39(mnemonic string, passphrase string, account uint32, index uint32) (Signer, error) { +func SignerFromBip39(chainID string, mnemonic string, passphrase string, account uint32, index uint32) (Signer, error) { kb := keys.NewInMemory() name := "default" password := "" // Password isn't needed for in-memory storage @@ -138,6 +138,7 @@ func SignerFromBip39(mnemonic string, passphrase string, account uint32, index u Keybase: kb, Account: name, Password: password, + ChainID: chainID, } return &signer, nil