diff --git a/src/gui/views/wallets/wallet/txs/content.rs b/src/gui/views/wallets/wallet/txs/content.rs index b1d98d0..e7a63dd 100644 --- a/src/gui/views/wallets/wallet/txs/content.rs +++ b/src/gui/views/wallets/wallet/txs/content.rs @@ -204,8 +204,10 @@ impl WalletTransactions { }); } + let wallet_loaded = wallet.foreign_api_port().is_some(); + // Draw button to show transaction finalization. - if tx.can_finalize { + if wallet_loaded && tx.can_finalize { let (icon, color) = (CHECK, Some(Colors::green())); View::item_button(ui, Rounding::default(), icon, color, || { cb.hide_keyboard(); @@ -214,7 +216,6 @@ impl WalletTransactions { } // Draw button to cancel transaction. - let wallet_loaded = wallet.foreign_api_port().is_some(); if wallet_loaded && tx.can_cancel() { let (icon, color) = (PROHIBIT, Some(Colors::red())); View::item_button(ui, Rounding::default(), icon, color, || { diff --git a/src/gui/views/wallets/wallet/txs/tx.rs b/src/gui/views/wallets/wallet/txs/tx.rs index 8bcc89a..cfc4ae7 100644 --- a/src/gui/views/wallets/wallet/txs/tx.rs +++ b/src/gui/views/wallets/wallet/txs/tx.rs @@ -140,8 +140,10 @@ impl WalletTransactionModal { return; } + let wallet_loaded = wallet.foreign_api_port().is_some(); + // Draw button to show transaction finalization or transaction info. - if tx.can_finalize { + if wallet_loaded && tx.can_finalize { let (icon, color) = if self.show_finalization { (FILE_TEXT, None) } else { @@ -161,7 +163,6 @@ impl WalletTransactionModal { } // Draw button to cancel transaction. - let wallet_loaded = wallet.foreign_api_port().is_some(); if wallet_loaded && tx.can_cancel() { View::item_button(ui, Rounding::default(), PROHIBIT, Some(Colors::red()), || { cb.hide_keyboard();