-
Notifications
You must be signed in to change notification settings - Fork 10
Import private keys and wallets + replace toolchain with stagex #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ds for wallets and private keys
Ulexus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some small things, but looks good to me
src/cmd/turnkey/pkg/encrypt.go
Outdated
| } | ||
|
|
||
| var plaintextBytes []byte | ||
| plaintextBytes, err = hex.DecodeString(plaintext) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gosimplify: just instantiate with the return: plaintextBytes, err := hex.Decode...?
| walletCreateCmd.Flags().StringVar(&walletNameOrID, "name", "", "name to be applied to the wallet") | ||
| walletCreateCmd.Flags().StringVar(&walletNameOrID, "name", "", "name to be applied to the wallet.") | ||
|
|
||
| walletInitImportCmd.Flags().StringVar(&user, "user", "", "ID of user to importing the wallet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For things like this in a common namespace, it would be safer to additionally namespaces the package-scoped variable here. Perhaps something like user -> walletInitImportUser?
| walletInitImportCmd.Flags().StringVar(&user, "user", "", "ID of user to importing the wallet") | ||
| walletInitImportCmd.Flags().StringVar(&importBundlePath, "import-bundle-output", "", "filepath to write the import bundle to.") | ||
|
|
||
| walletImportCmd.Flags().StringVar(&user, "user", "", "ID of user to importing the wallet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While these two commands should never be executed on the same run, it feels dangerous to reuse the variables like this
timurnkey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LFG!!!! 🚀
Summary & Motivation (Problem vs. Solution)
Wallet Import Flow:
Private Key Import Flow:
Release Steps
See README for additional details.