add match case to remove key error

This commit is contained in:
Jack Chakany 2024-08-22 12:23:57 -04:00
parent 695979aaaa
commit e4d8aa62ee

View file

@ -289,7 +289,10 @@ fn render_app(app: &mut Hoot, ctx: &egui::Context) {
ui.horizontal(|ui| {
ui.label(format!("Key ID: {}", key.public_key().to_bech32().unwrap()));
if ui.button("Remove Key").clicked() {
let _ = app.account_manager.delete_key(&key);
match app.account_manager.delete_key(&key) {
Ok(..) => {},
Err(v) => error!("couldn't remove key: {}", v),
}
}
});
}