Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/constant/gas-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ export const L2_DEPOSIT_ADDRESS_MAP: Record<string, string> = {

export const LOW_GAS_ACCOUNT_BALANCE = 1;

export const GAS_ACCOUNT_WITHDRAWED_ADDRESS =
'0xad003006ceb0934012c289d1cfdb1db915998f74';
export const GAS_ACCOUNT_WITHDRAWED_ADDRESSES = [
'0xad003006ceb0934012c289d1cfdb1db915998f74',
'0x5f90d992166156876f495f57a913646cdf6e0edb',
];

export const GAS_ACCOUNT_RECEIVED_ADDRESS =
'0x91604f590d66ace8975eed6bd16cf55647d1c499';
6 changes: 4 additions & 2 deletions src/ui/component/TxHistory/TxInterAddressExplain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next';
import { TxHistoryItemRow } from '@/db/schema/history';
import {
GAS_ACCOUNT_RECEIVED_ADDRESS,
GAS_ACCOUNT_WITHDRAWED_ADDRESS,
GAS_ACCOUNT_WITHDRAWED_ADDRESSES,
L2_DEPOSIT_ADDRESS_MAP,
} from '@/constant/gas-account';
import { isSameAddress } from '@/ui/utils';
Expand Down Expand Up @@ -101,7 +101,9 @@ export const TxInterAddressExplain = ({ data }: TxInterAddressExplainProps) => {
} else if (
data.cate_id === 'receive' &&
data.tx?.from_addr &&
isSameAddress(data.tx.from_addr, GAS_ACCOUNT_WITHDRAWED_ADDRESS)
GAS_ACCOUNT_WITHDRAWED_ADDRESSES.some((addr) =>
isSameAddress(data.tx!.from_addr, addr)
)
) {
tokenURL = data.receives?.[0]?.token?.logo_url || '';
// gas withdraw
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TxHistoryItemRow } from '@/db/schema/history';
import {
GAS_ACCOUNT_RECEIVED_ADDRESS,
GAS_ACCOUNT_WITHDRAWED_ADDRESS,
GAS_ACCOUNT_WITHDRAWED_ADDRESSES,
L2_DEPOSIT_ADDRESS_MAP,
} from '@/constant/gas-account';
import { NameAndAddress, TxAvatar } from '@/ui/component';
Expand Down Expand Up @@ -106,7 +106,9 @@ export const DesktopTxExplain = ({ data }: TxInterAddressExplainProps) => {
} else if (
data.cate_id === 'receive' &&
data.tx?.from_addr &&
isSameAddress(data.tx.from_addr, GAS_ACCOUNT_WITHDRAWED_ADDRESS)
GAS_ACCOUNT_WITHDRAWED_ADDRESSES.some((addr) =>
isSameAddress(data.tx!.from_addr, addr)
)
) {
tokenURL = data.receives?.[0]?.token?.logo_url || '';
// gas withdraw
Expand Down
Loading