Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ItayLevyOfficial committed May 24, 2023
1 parent e95f769 commit 2a19b37
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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 <chain-id>",
Short: "Initialize a rollapp configuration on your local machine",
Expand Down

0 comments on commit 2a19b37

Please sign in to comment.