mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 03:33:53 +00:00
You page: render public key even if private key still locked
This commit is contained in:
parent
4bc65033b6
commit
9b78a17963
@ -16,22 +16,8 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
|||||||
ui.separator();
|
ui.separator();
|
||||||
ui.add_space(10.0);
|
ui.add_space(10.0);
|
||||||
|
|
||||||
if GLOBALS.signer.blocking_read().is_ready() {
|
// Render public key if available
|
||||||
ui.heading("Ready to sign events");
|
if let Some(public_key) = GLOBALS.signer.blocking_read().public_key() {
|
||||||
|
|
||||||
ui.add_space(10.0);
|
|
||||||
|
|
||||||
let key_security = GLOBALS.signer.blocking_read().key_security().unwrap();
|
|
||||||
let public_key = GLOBALS.signer.blocking_read().public_key().unwrap();
|
|
||||||
|
|
||||||
ui.label(&*format!(
|
|
||||||
"Private Key security is {}",
|
|
||||||
match key_security {
|
|
||||||
KeySecurity::Weak => "weak",
|
|
||||||
KeySecurity::Medium => "medium",
|
|
||||||
}
|
|
||||||
));
|
|
||||||
|
|
||||||
let pkhex: PublicKeyHex = public_key.into();
|
let pkhex: PublicKeyHex = public_key.into();
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.label(&format!("Public Key (Hex): {}", pkhex.0));
|
ui.label(&format!("Public Key (Hex): {}", pkhex.0));
|
||||||
@ -48,6 +34,26 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ui.add_space(10.0);
|
||||||
|
ui.separator();
|
||||||
|
ui.add_space(10.0);
|
||||||
|
|
||||||
|
if GLOBALS.signer.blocking_read().is_ready() {
|
||||||
|
ui.heading("Ready to sign events");
|
||||||
|
|
||||||
|
ui.add_space(10.0);
|
||||||
|
|
||||||
|
let key_security = GLOBALS.signer.blocking_read().key_security().unwrap();
|
||||||
|
|
||||||
|
ui.label(&*format!(
|
||||||
|
"Private Key security is {}",
|
||||||
|
match key_security {
|
||||||
|
KeySecurity::Weak => "weak",
|
||||||
|
KeySecurity::Medium => "medium",
|
||||||
|
}
|
||||||
|
));
|
||||||
|
|
||||||
ui.add_space(10.0);
|
ui.add_space(10.0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user