Skip to content

Commit 9af5a23

Browse files
authored
Merge branch 'develop' into chore/sync-strategy
2 parents 96e80cc + 0ec8520 commit 9af5a23

3 files changed

Lines changed: 27 additions & 4 deletions

File tree

apps/explorer/src/components/activity/TransactionsActivityTable.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ import { InfoBox, InfoBoxStyle, InfoBoxType, Select, SelectSize } from '@iota/ap
1616
import { generateTransactionsTableColumns } from '~/lib/ui';
1717
import { Warning } from '@iota/apps-ui-icons';
1818
import { PAGE_SIZES_RANGE_20_60 } from '~/lib/constants';
19-
import { type IotaTransactionKind } from '@iota/iota-sdk/client';
19+
import { type IotaTransactionBlockResponse, type IotaTransactionKind } from '@iota/iota-sdk/client';
20+
import { EVM_ANCHOR_ADDRESSES } from '~/lib/constants/evm.constants';
21+
22+
function isEvmTransaction(tx: IotaTransactionBlockResponse): boolean {
23+
const sender = tx.transaction?.data.sender;
24+
return !!sender && EVM_ANCHOR_ADDRESSES.includes(sender);
25+
}
2026

2127
interface TransactionsActivityTableProps {
2228
disablePagination?: boolean;
@@ -50,6 +56,11 @@ export function TransactionsActivityTable({
5056
goToFirstPageRef.current = pagination.onFirst;
5157
const tableColumns = generateTransactionsTableColumns();
5258

59+
const displayData =
60+
transactionKindFilter === 'ProgrammableTransaction'
61+
? { ...data, data: data?.data.filter((tx) => !isEvmTransaction(tx)) }
62+
: data;
63+
5364
useEffect(() => {
5465
goToFirstPageRef.current();
5566
}, [transactionKindFilter]);
@@ -65,15 +76,15 @@ export function TransactionsActivityTable({
6576
/>
6677
) : (
6778
<div className="flex flex-col space-y-3 text-left">
68-
{isPending || isFetching || !data?.data ? (
79+
{isPending || isFetching || !displayData?.data ? (
6980
<PlaceholderTable
7081
rowCount={limit}
7182
rowHeight="16px"
7283
colHeadings={['Type', 'Sender', 'Txns', 'Gas', 'Time']}
7384
/>
7485
) : (
7586
<TableCard
76-
data={data.data}
87+
data={displayData!.data}
7788
columns={tableColumns}
7889
totalLabel={count ? `${numberSuffix(Number(count))} Total` : '-'}
7990
viewAll="/recent"

apps/explorer/src/lib/constants/evm.constants.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
export const EVM_ADDRESS_LENGTH = 44;
5+
6+
// Known EVM anchor sender addresses per network.
7+
// Add new network addresses here as the EVM is deployed to more networks.
8+
export const EVM_ANCHOR_ADDRESSES: string[] = [
9+
'0x7b4a34f6a011794f0ecbe5e5beb96102d3eef6122eb929b9f50a8d757bfbdd67', // mainnet
10+
];
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/bin/bash
22
# This script is meant to be run from the "Ignored Build Step" in Vercel.
33

4-
PACKAGE_NAME="$(pnpm pkg get name | tr -d '"')"
4+
PACKAGE_NAME="$(jq -r .name package.json)"
5+
6+
echo "Package: $PACKAGE_NAME"
7+
echo "HEAD: $(git rev-parse HEAD)"
8+
echo "HEAD^1: $(git rev-parse HEAD^1)"
9+
echo "Changed files:"
10+
git diff --name-only HEAD^1 HEAD | sed 's/^/ /'
511

612
pnpx turbo query affected --packages "$PACKAGE_NAME" --base=HEAD^1 --exit-code

0 commit comments

Comments
 (0)