diff --git a/src/ui/identities/add_new_identity_screen/mod.rs b/src/ui/identities/add_new_identity_screen/mod.rs index d795d6a04..eae08f9ab 100644 --- a/src/ui/identities/add_new_identity_screen/mod.rs +++ b/src/ui/identities/add_new_identity_screen/mod.rs @@ -373,6 +373,17 @@ impl AddNewIdentityScreen { if ui.selectable_label(is_selected, wallet_alias).clicked() { // Update the selected wallet selected_wallet = Some(wallet.clone()); + // Reset the funding address + self.funding_address = None; + // Reset the funding asset lock + self.funding_asset_lock = None; + // Reset the funding UTXO + self.funding_utxo = None; + // Reset the copied to clipboard state + self.copied_to_clipboard = None; + // Reset the step to choose funding method + let mut step = self.step.write().unwrap(); + *step = WalletFundedScreenStep::ChooseFundingMethod; } } }); diff --git a/src/ui/identities/top_up_identity_screen/mod.rs b/src/ui/identities/top_up_identity_screen/mod.rs index a93d4dd2b..d3e7878a4 100644 --- a/src/ui/identities/top_up_identity_screen/mod.rs +++ b/src/ui/identities/top_up_identity_screen/mod.rs @@ -117,6 +117,17 @@ impl TopUpIdentityScreen { if ui.selectable_label(is_selected, wallet_alias).clicked() { // Update the selected wallet from app_context self.wallet = Some(wallet.clone()); + // Reset the funding address + self.funding_address = None; + // Reset the funding asset lock + self.funding_asset_lock = None; + // Reset the funding UTXO + self.funding_utxo = None; + // Reset the copied to clipboard state + self.copied_to_clipboard = None; + // Reset the step to choose funding method + let mut step = self.step.write().unwrap(); + *step = WalletFundedScreenStep::ChooseFundingMethod; } }); }