Skip to content

Commit

Permalink
Merge branch 'development' of github.com:multiversx/mx-explorer-dapp …
Browse files Browse the repository at this point in the history
…into next
  • Loading branch information
radumojic committed Nov 13, 2024
2 parents b4bcd18 + b46d1b1 commit a5b0bda
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -43,15 +43,13 @@ export const StatusColumnFilters = ({
const allInactive = [
TransactionFiltersEnum.status,
TransactionFiltersEnum.miniBlockHash,
TransactionFiltersEnum.relayer,
TransactionFiltersEnum.isRelayed,
TransactionFiltersEnum.hashes
].every((filter) => inactiveFilters.includes(filter));

const isActive =
status !== undefined ||
miniBlockHash !== undefined ||
relayer !== undefined ||
isRelayed !== undefined ||
hashes !== undefined;

Expand Down Expand Up @@ -95,18 +93,6 @@ export const StatusColumnFilters = ({
</div>
)}

{!inactiveFilters.includes(TransactionFiltersEnum.relayer) && (
<div className='filter-block'>
<div className='mb-1'>Relayer</div>
<SearchFilter
name='relayer-filter'
filter={TransactionFiltersEnum.relayer}
placeholder='Relayer'
validation='address'
/>
</div>
)}

{!inactiveFilters.includes(TransactionFiltersEnum.hashes) && (
<div className='filter-block'>
<div className='mb-1'>Txn Hash</div>
Expand Down
2 changes: 0 additions & 2 deletions src/hooks/adapter/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export function getTransactionsParams({
search,
token,
hashes,
relayer,
isRelayed = false,

// include data
Expand Down Expand Up @@ -85,7 +84,6 @@ export function getTransactionsParams({
...(search ? { search } : {}),
...(token ? { token } : {}),
...(hashes ? { hashes } : {}),
...(relayer ? { relayer } : {}),
...(isRelayed ? { isRelayed } : {})
};

Expand Down
1 change: 0 additions & 1 deletion src/hooks/urlFilters/useGetTransactionFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
};
6 changes: 2 additions & 4 deletions src/pages/Transactions/Transactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down Expand Up @@ -59,7 +57,7 @@ export const Transactions = () => {
<TransactionsTable
transactions={transactions}
totalTransactions={totalTransactions}
inactiveFilters={[TransactionFiltersEnum.relayer]}
inactiveFilters={[]}
dataChanged={dataChanged}
isDataReady={isDataReady}
title={
Expand Down
1 change: 0 additions & 1 deletion src/types/adapter.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export interface GetTransactionsType extends SortableApiType {
withScamInfo?: boolean;
withUsername?: boolean;
withBlockInfo?: boolean;
relayer?: boolean;
isRelayed?: boolean;
}

Expand Down
1 change: 0 additions & 1 deletion src/types/transaction.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ export enum TransactionFiltersEnum {
search = 'search',
token = 'token',
transactionsInPoolType = 'type',
relayer = 'relayer',
hashes = 'hashes',
isRelayed = 'isRelayed'
}
Expand Down

0 comments on commit a5b0bda

Please sign in to comment.