-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[cli] Validate alias #15307
[cli] Validate alias #15307
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
@stefan-mysten is attempting to deploy a commit to the Sui Foundation Team on Vercel. A member of the Team first needs to authorize it. |
@@ -82,18 +82,7 @@ pub trait AccountKeystore: Send + Sync { | |||
bail!("The provided alias {old_alias} does not exist"); | |||
} | |||
let new_alias_name = match new_alias { | |||
Some(x) => { |
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.
This whole logic is moved into its own function below.
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.
LGTM!
## Description Introduce a validation step when creating or updating an alias. The alias must start with a letter and can contain only letters, digits, hyphens (-), or underscores (_). ## Test Plan Updated existing tests. --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [x] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes Added a validation step for alias naming when creating or updating the alias of an address in the Sui CLI. The alias must start with a letter and can contain only letters, digits, hyphens (-), or underscores (_).
Description
Introduce a validation step when creating or updating an alias. The alias must start with a letter and can contain only letters, digits, hyphens (-), or underscores (_).
Test Plan
Updated existing tests.
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes
Added a validation step when creating or updating an alias of an address in the Sui CLI. The alias must start with a letter and can contain only letters, digits, hyphens (-), or underscores (_).