From b4ded324f9516de905c18e1babb0e989b19d813c Mon Sep 17 00:00:00 2001 From: ardocrat Date: Mon, 20 May 2024 19:38:21 +0300 Subject: [PATCH] tx: do not show qr code with empty text --- src/gui/views/wallets/wallet/txs.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/views/wallets/wallet/txs.rs b/src/gui/views/wallets/wallet/txs.rs index 844d480..27f5804 100644 --- a/src/gui/views/wallets/wallet/txs.rs +++ b/src/gui/views/wallets/wallet/txs.rs @@ -708,6 +708,9 @@ impl WalletTransactions { if self.tx_info_show_qr { // Draw QR code content. let text = self.tx_info_response_edit.clone(); + if text.is_empty() { + self.tx_info_show_qr = false; + } self.tx_info_qr_code_content.ui(ui, text.clone()); ui.add_space(6.0); @@ -724,7 +727,7 @@ impl WalletTransactions { // Setup value to finalization input field. self.tx_info_finalize_edit = result.value(); - self.on_finalization_input_change(tx, wallet, modal, ); + self.on_finalization_input_change(tx, wallet, modal, cb); modal.enable_closing(); self.tx_info_show_scanner = false;