From 445315cfae24775e38abb5450c3bbc3651bd2342 Mon Sep 17 00:00:00 2001 From: Radu Mojic Date: Wed, 13 Nov 2024 18:30:24 +0200 Subject: [PATCH 1/2] removed relayer filter --- .../StatusColumnFilters.tsx | 18 +++--------------- src/hooks/adapter/helpers.ts | 2 -- .../urlFilters/useGetTransactionFilters.ts | 1 - src/pages/Transactions/Transactions.tsx | 6 ++---- src/types/adapter.types.ts | 1 - src/types/transaction.types.ts | 1 - 6 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx b/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx index e6d64d1df..0d0631efc 100644 --- a/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx +++ b/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx @@ -15,7 +15,7 @@ export const StatusColumnFilters = ({ inactiveFilters?: TransactionFiltersEnum[]; }) => { const [searchParams] = useSearchParams(); - const { status, hashes, miniBlockHash, relayer, isRelayed } = + const { status, hashes, miniBlockHash, isRelayed } = Object.fromEntries(searchParams); const existingHashesValues: SelectFilterType['options'] = useMemo(() => { @@ -40,10 +40,11 @@ export const StatusColumnFilters = ({ const relayedOptions = [{ value: 'true', label: 'Relayed' }]; + console.log('0----', inactiveFilters); + const allInactive = [ TransactionFiltersEnum.status, TransactionFiltersEnum.miniBlockHash, - TransactionFiltersEnum.relayer, TransactionFiltersEnum.isRelayed, TransactionFiltersEnum.hashes ].every((filter) => inactiveFilters.includes(filter)); @@ -51,7 +52,6 @@ export const StatusColumnFilters = ({ const isActive = status !== undefined || miniBlockHash !== undefined || - relayer !== undefined || isRelayed !== undefined || hashes !== undefined; @@ -95,18 +95,6 @@ export const StatusColumnFilters = ({ )} - {!inactiveFilters.includes(TransactionFiltersEnum.relayer) && ( -
-
Relayer
- -
- )} - {!inactiveFilters.includes(TransactionFiltersEnum.hashes) && (
Txn Hash
diff --git a/src/hooks/adapter/helpers.ts b/src/hooks/adapter/helpers.ts index fa0f20b20..69fc13b87 100644 --- a/src/hooks/adapter/helpers.ts +++ b/src/hooks/adapter/helpers.ts @@ -44,7 +44,6 @@ export function getTransactionsParams({ search, token, hashes, - relayer, isRelayed = false, // include data @@ -85,7 +84,6 @@ export function getTransactionsParams({ ...(search ? { search } : {}), ...(token ? { token } : {}), ...(hashes ? { hashes } : {}), - ...(relayer ? { relayer } : {}), ...(isRelayed ? { isRelayed } : {}) }; diff --git a/src/hooks/urlFilters/useGetTransactionFilters.ts b/src/hooks/urlFilters/useGetTransactionFilters.ts index 5688c8d54..39cf3d883 100644 --- a/src/hooks/urlFilters/useGetTransactionFilters.ts +++ b/src/hooks/urlFilters/useGetTransactionFilters.ts @@ -36,7 +36,6 @@ export const useGetTransactionFilters = () => { method: getParam(TransactionFiltersEnum.method), hashes: getParam(TransactionFiltersEnum.hashes), token: getParam(TransactionFiltersEnum.token), - relayer: getParam(TransactionFiltersEnum.relayer), isRelayed: getParam(TransactionFiltersEnum.isRelayed) }; }; diff --git a/src/pages/Transactions/Transactions.tsx b/src/pages/Transactions/Transactions.tsx index e9436d155..e7388b8c4 100644 --- a/src/pages/Transactions/Transactions.tsx +++ b/src/pages/Transactions/Transactions.tsx @@ -2,7 +2,7 @@ import { useEffect, useRef } from 'react'; import { useSelector } from 'react-redux'; import { useSearchParams } from 'react-router-dom'; -import { TransactionsTable, PulsatingLed, NetworkLink } from 'components'; +import { TransactionsTable, PulsatingLed } from 'components'; import { MethodList } from 'components/TransactionsTable/components'; import { useAdapter, @@ -12,8 +12,6 @@ import { useGetShardText } from 'hooks'; import { activeNetworkSelector } from 'redux/selectors'; -import { transactionsRoutes } from 'routes'; -import { TransactionFiltersEnum } from 'types'; export const Transactions = () => { const ref = useRef(null); @@ -59,7 +57,7 @@ export const Transactions = () => { Date: Wed, 13 Nov 2024 18:30:52 +0200 Subject: [PATCH 2/2] removed console log --- .../Filters/TransactionsFilters/StatusColumnFilters.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx b/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx index 0d0631efc..1e83f079c 100644 --- a/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx +++ b/src/components/Filters/TransactionsFilters/StatusColumnFilters.tsx @@ -40,8 +40,6 @@ export const StatusColumnFilters = ({ const relayedOptions = [{ value: 'true', label: 'Relayed' }]; - console.log('0----', inactiveFilters); - const allInactive = [ TransactionFiltersEnum.status, TransactionFiltersEnum.miniBlockHash,