fixed bug not being able to save multiple keypairs on macos
This commit is contained in:
parent
e30384c387
commit
db78b2a4d3
2 changed files with 4 additions and 2 deletions
|
@ -20,7 +20,7 @@ impl MacOSKeyStorage {
|
|||
fn add_key(&self, key: &Keys) -> Result<()> {
|
||||
match set_generic_password(
|
||||
self.service_name,
|
||||
&key.public_key().to_hex(),
|
||||
&key.public_key().to_hex().as_str(),
|
||||
key.secret_key().unwrap().as_secret_bytes(),
|
||||
) {
|
||||
Ok(_) => Ok(()),
|
||||
|
|
|
@ -49,7 +49,9 @@ impl OnboardingScreen {
|
|||
use crate::keystorage::KeyStorage;
|
||||
use nostr::ToBech32;
|
||||
|
||||
let first_key = app.account_manager.loaded_keys[0].clone();
|
||||
// here, we are assuming that the most recent key added is the one that was generated in
|
||||
// onboarding_new()'s button click.
|
||||
let first_key = app.account_manager.loaded_keys.last().expect("wanted a key from last screen").clone();
|
||||
ui.label(format!(
|
||||
"New identity: {}",
|
||||
first_key.public_key().to_bech32().unwrap()
|
||||
|
|
Loading…
Add table
Reference in a new issue