Skip to content

Commit

Permalink
fix: in wallet block certain keys during popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cifko committed Jul 30, 2021
1 parent 0e0bfe0 commit f72656d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
12 changes: 8 additions & 4 deletions applications/tari_console_wallet/src/ui/components/send_tab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,13 +626,17 @@ impl<B: Backend> Component<B> for SendTab {
}

fn on_key(&mut self, app_state: &mut AppState, c: char) {
if self.error_message.is_some() && '\n' == c {
self.error_message = None;
if self.error_message.is_some() {
if '\n' == c {
self.error_message = None;
}
return;
}

if self.success_message.is_some() && '\n' == c {
self.success_message = None;
if self.success_message.is_some() {
if '\n' == c {
self.success_message = None;
}
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,9 @@ impl<B: Backend> Component<B> for TransactionsTab {
}

fn on_up(&mut self, app_state: &mut AppState) {
if self.confirmation_dialog {
return;
}
match self.selected_tx_list {
SelectedTransactionList::None => {},
SelectedTransactionList::PendingTxs => {
Expand All @@ -575,6 +578,9 @@ impl<B: Backend> Component<B> for TransactionsTab {
}

fn on_down(&mut self, app_state: &mut AppState) {
if self.confirmation_dialog {
return;
}
match self.selected_tx_list {
SelectedTransactionList::None => {},
SelectedTransactionList::PendingTxs => {
Expand Down Expand Up @@ -602,6 +608,7 @@ impl<B: Backend> Component<B> for TransactionsTab {
self.pending_list_state.select(None);
self.completed_list_state.select(None);
self.detailed_transaction = None;
self.confirmation_dialog = false;
}
}

Expand Down

0 comments on commit f72656d

Please sign in to comment.