From ec20f44dfb1888f4c484a32d09553a34410b9361 Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 22 Jan 2026 16:46:27 -0500 Subject: [PATCH 1/3] fix: display WIF format for manually added private keys Externally loaded identities with manually added private keys now show both WIF and hex formats, matching the display for wallet-derived keys. Co-Authored-By: Claude Opus 4.5 --- src/ui/identities/keys/key_info_screen.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui/identities/keys/key_info_screen.rs b/src/ui/identities/keys/key_info_screen.rs index 586c4c910..0fea93381 100644 --- a/src/ui/identities/keys/key_info_screen.rs +++ b/src/ui/identities/keys/key_info_screen.rs @@ -305,6 +305,21 @@ impl ScreenLike for KeyInfoScreen { .num_columns(2) .spacing([10.0, 10.0]) .show(ui, |ui| { + if let Ok(secret_key) = SecretKey::from_slice(clear) { + let private_key = + PrivateKey::new(secret_key, self.app_context.network); + ui.label( + RichText::new("Private Key (WIF):") + .strong() + .color(ui.visuals().text_color()), + ); + ui.label( + RichText::new(private_key.to_wif()) + .color(ui.visuals().text_color()), + ); + ui.end_row(); + } + ui.label( RichText::new("Private Key (Hex):") .strong() From 7d7f698b6f591dd3839e87a9e52ac1de394fb421 Mon Sep 17 00:00:00 2001 From: pauldelucia Date: Fri, 23 Jan 2026 14:10:40 +0700 Subject: [PATCH 2/3] clippy --- src/ui/identities/withdraw_screen.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ui/identities/withdraw_screen.rs b/src/ui/identities/withdraw_screen.rs index 2ad49338c..13a1ace37 100644 --- a/src/ui/identities/withdraw_screen.rs +++ b/src/ui/identities/withdraw_screen.rs @@ -171,8 +171,8 @@ impl WithdrawalScreen { }); // In dev mode with OWNER key, show hint about auto-selected payout address - if self.app_context.is_developer_mode() && is_owner_key { - if let Some(payout_address) = self + if self.app_context.is_developer_mode() && is_owner_key + && let Some(payout_address) = self .identity .masternode_payout_address(self.app_context.network) { @@ -185,7 +185,6 @@ impl WithdrawalScreen { .color(Color32::GRAY), ); } - } } else { ui.label(format!( "Masternode payout address: {}", From 45e6e72e5e382d0422eae14bc198acea594cde6b Mon Sep 17 00:00:00 2001 From: pauldelucia Date: Fri, 23 Jan 2026 14:13:46 +0700 Subject: [PATCH 3/3] fmt --- src/ui/identities/withdraw_screen.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/ui/identities/withdraw_screen.rs b/src/ui/identities/withdraw_screen.rs index 13a1ace37..7cc8bb8c4 100644 --- a/src/ui/identities/withdraw_screen.rs +++ b/src/ui/identities/withdraw_screen.rs @@ -171,20 +171,21 @@ impl WithdrawalScreen { }); // In dev mode with OWNER key, show hint about auto-selected payout address - if self.app_context.is_developer_mode() && is_owner_key + if self.app_context.is_developer_mode() + && is_owner_key && let Some(payout_address) = self .identity .masternode_payout_address(self.app_context.network) - { - ui.label( - RichText::new(format!( - "Leave empty to use masternode payout address: {}", - payout_address - )) - .italics() - .color(Color32::GRAY), - ); - } + { + ui.label( + RichText::new(format!( + "Leave empty to use masternode payout address: {}", + payout_address + )) + .italics() + .color(Color32::GRAY), + ); + } } else { ui.label(format!( "Masternode payout address: {}",