@@ -63,7 +63,7 @@ func handleGenerateCmd(ctx *cli.Context, dHandler *dataHandler) error {
6363 password = []byte (pwdflag )
6464 }
6565
66- _ , err := generateKeypair (keytype , dHandler .datadir , password , uint8 (ctx .Uint (config .SubkeyNetworkFlag .Name )))
66+ _ , err := generateKeypair (keytype , dHandler .datadir , password , uint16 (ctx .Uint (config .SubkeyNetworkFlag .Name )))
6767 if err != nil {
6868 return fmt .Errorf ("failed to generate key: %w" , err )
6969 }
@@ -159,7 +159,7 @@ func importPrivKey(ctx *cli.Context, keytype, datadir, key string, password []by
159159 if keytype == crypto .Sr25519Type {
160160 // generate sr25519 keys
161161 network := ctx .Uint (config .SubkeyNetworkFlag .Name )
162- kp , err = sr25519 .NewKeypairFromSeed (key , uint8 (network ))
162+ kp , err = sr25519 .NewKeypairFromSeed (key , uint16 (network ))
163163 if err != nil {
164164 return "" , fmt .Errorf ("could not generate sr25519 keypair from given string: %w" , err )
165165 }
@@ -335,7 +335,7 @@ func getKeyFiles(datadir string) ([]string, error) {
335335// generateKeypair create a new keypair with the corresponding type and saves it to datadir/keystore/[public key].key
336336// in json format encrypted using the specified password
337337// it returns the resulting filepath of the new key
338- func generateKeypair (keytype , datadir string , password []byte , subNetwork uint8 ) (string , error ) {
338+ func generateKeypair (keytype , datadir string , password []byte , subNetwork uint16 ) (string , error ) {
339339 if password == nil {
340340 password = keystore .GetPassword ("Enter password to encrypt keystore file:" )
341341 }
0 commit comments