From 2a19b37620c826174648794373ca5bd99673b643 Mon Sep 17 00:00:00 2001 From: Itay Levy Date: Wed, 24 May 2023 15:47:04 +0300 Subject: [PATCH] minor refactor --- cmd/init.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmd/init.go b/cmd/init.go index f4514bae..be8d127f 100644 --- a/cmd/init.go +++ b/cmd/init.go @@ -14,9 +14,9 @@ const hubRPC string = "https://rpc-hub-35c.dymension.xyz:443" const lightNodeEndpointFlag = "light-node-endpoint" func createKey(relativePath string, keyId string, coinType ...uint32) (keyring.Info, error) { - // set the default coin type if len(coinType) == 0 { - coinType = []uint32{118} + const cosmosDefaultCointype uint32 = 118 + coinType = []uint32{cosmosDefaultCointype} } rollappAppName := "rollapp" kr, err := keyring.New( @@ -36,6 +36,10 @@ func createKey(relativePath string, keyId string, coinType ...uint32) (keyring.I return info, nil } +func generateRollappKeys() (keyring.Info, error) { + return createKey(".rollapp", "rollapp_sequencer") +} + var initCmd = &cobra.Command{ Use: "init ", Short: "Initialize a rollapp configuration on your local machine",