-
Notifications
You must be signed in to change notification settings - Fork 75
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
Feat/os keychain followup #1770
base: feat/os_keychain
Are you sure you want to change the base?
Conversation
244508d
to
a97ccbb
Compare
072a3af
to
e120595
Compare
df3543a
to
3311a50
Compare
6a4b0ff
to
f263d8d
Compare
c39bf60
to
fe02078
Compare
let entry = StellarEntry::new(&entry_name)?; | ||
match entry.delete_password() { | ||
Ok(()) => {} | ||
Err(e) if e.to_string() == keyring::Error::NoEntry.to_string() => { |
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.
Err(e) if e.to_string() == keyring::Error::NoEntry.to_string() => { | |
Err(keyring::Error::NoEntry) => { |
Is e
equal to the the error? Does this work?
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.
Yeah, this line is a bit weird, thanks for reminding me! The thing I was running into is that e
an error wrapped in custom errors twice, if that makes sense => locator::Error -> signer::keyring::Error -> keyring::Error. So, matching directly on keyring::Error::NoEntry
wasn't working.
I just pushed up an update so we're not comparing the error strings. Lmk what you think!
c0bfc66
to
f4e2913
Compare
f4e2913
to
3acc3d0
Compare
What
This PR is based on #1703 and adds some additional compatibility with the secure store like
keys rm
andkeys add
.keys rm
keys add
cargo run keys add --secure-store --entry-name alice alice
cargo run keys address alice
stello keys rm alice
cargo run keys add --secure-store --entry-name alice alice
cargo run keys address alice
stello keys rm alice
cargo run keys add --secure-store --entry-name alice alice
cargo run keys address alice
stello keys rm alice
Why
I wanted to keep #1703 from getting too big so it was easier to review.
Known limitations
[TODO or N/A]