From 5d245cd82061c369494cbd71854f1affa2b4bdcd Mon Sep 17 00:00:00 2001 From: eniolam1000752 Date: Sun, 26 Dec 2021 22:03:36 +0100 Subject: [PATCH] fixed issue --- i18n/locales/en/common.json | 1 - src/components/shared/searchBar/searchBar.js | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/i18n/locales/en/common.json b/i18n/locales/en/common.json index 0461d59bec..9c949f2e93 100644 --- a/i18n/locales/en/common.json +++ b/i18n/locales/en/common.json @@ -280,7 +280,6 @@ "Min": "Min", "Minimize": "Minimize", "Missed slot": "Missed slot", - "Modify recovery phrase derivation path": "Modify recovery phrase derivation path", "More filters": "More filters", "Multisignature account details": "Multisignature account details", "Multisignatures": "Multisignatures", diff --git a/src/components/shared/searchBar/searchBar.js b/src/components/shared/searchBar/searchBar.js index 21d46d1b52..8660762f4e 100644 --- a/src/components/shared/searchBar/searchBar.js +++ b/src/components/shared/searchBar/searchBar.js @@ -20,6 +20,7 @@ class SearchBar extends React.Component { this.onChangeSearchTextValue = this.onChangeSearchTextValue.bind(this); this.onSelectAccount = this.onSelectedRow.bind(this, 'account'); + this.onSelectDelegateAccount = this.onSelectedRow.bind(this, 'delegate-account'); this.onSelectTransaction = this.onSelectedRow.bind(this, 'transactions'); this.onSelectBlock = this.onSelectedRow.bind(this, 'block'); this.onHandleKeyPress = this.onHandleKeyPress.bind(this); @@ -52,6 +53,8 @@ class SearchBar extends React.Component { onSelectedRow(type, value) { if (type === 'transactions') { addSearchParamsToUrl(this.props.history, { modal: 'transactionDetails', transactionId: value }); + } else if (type === 'delegate-account') { + this.props.history.push(`${routes.account.path}?${routes.account.searchParam}=${value}&tab=delegateProfile`); } else { this.props.history.push(`${routes[type].path}?${routes[type].searchParam}=${value}`); } @@ -81,7 +84,7 @@ class SearchBar extends React.Component { const { rowItemIndex } = this.state; if (addresses.length) this.onSelectAccount(addresses[rowItemIndex].address); - if (delegates.length) this.onSelectAccount(delegates[rowItemIndex].summary?.address); + if (delegates.length) this.onSelectDelegateAccount(delegates[rowItemIndex].summary?.address); if (transactions.length) this.onSelectTransaction(transactions[rowItemIndex].id); if (blocks.length) this.onSelectTransaction(blocks[rowItemIndex].id); } @@ -168,7 +171,7 @@ class SearchBar extends React.Component {