diff --git a/package.json b/package.json index 74e39a32d6..c60ae31523 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "lint": "yarn workspace arb-token-bridge-ui lint", "lint:fix": "yarn workspace arb-token-bridge-ui lint:fix", "test:e2e": "yarn workspace arb-token-bridge-ui env-cmd --silent --file .e2e.env yarn synpress run --configFile synpress.config.ts", - "test:e2e:cctp": "E2E_CCTP=true yarn test:e2e", + "test:e2e:cctp": "yarn test:e2e --configFile synpress.cctp.config.ts", "test:e2e:orbit": "E2E_ORBIT=true yarn test:e2e" }, "resolutions": { diff --git a/packages/arb-token-bridge-ui/.e2e.env.sample b/packages/arb-token-bridge-ui/.e2e.env.sample index 573ce3d690..28ca742afc 100644 --- a/packages/arb-token-bridge-ui/.e2e.env.sample +++ b/packages/arb-token-bridge-ui/.e2e.env.sample @@ -12,6 +12,8 @@ CYPRESS_RECORD_VIDEO=false # Below key is only used to fund the newly created wallet PRIVATE_KEY_CUSTOM=b6b15c8cb491557369f3c7d2c287b053eb229daa9c22138887752191c9520659 +PRIVATE_KEY_CCTP= + # We set up MetaMask ourselves SKIP_METAMASK_SETUP=true diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableDetailsSteps.tsx b/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableDetailsSteps.tsx index 61a321c1ac..a349b939ff 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableDetailsSteps.tsx +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableDetailsSteps.tsx @@ -21,7 +21,7 @@ import { ExternalLink } from '../common/ExternalLink' import { TransferCountdown } from '../common/TransferCountdown' import { isDepositReadyToRedeem } from '../../state/app/utils' import { Address } from '../../util/AddressUtils' -import { isTeleport } from '@/token-bridge-sdk/teleport' +import { isTeleportTx } from '../../hooks/useTransactions' import { firstRetryableLegRequiresRedeem, secondRetryableLegForTeleportRequiresRedeem @@ -31,7 +31,6 @@ import { minutesToHumanReadableTime, useTransferDuration } from '../../hooks/useTransferDuration' -import { isTeleporterTransaction } from '../../hooks/useTransactions' function needsToClaimTransfer(tx: MergedTransaction) { return tx.isCctp || tx.isWithdrawal @@ -119,7 +118,7 @@ const LastStepEndItem = ({ const destinationChainId = tx.isWithdrawal ? tx.parentChainId : tx.childChainId - const isTeleportTx = isTeleport(tx) && isTeleporterTransaction(tx) + const isTeleport = isTeleportTx(tx) if (destinationNetworkTxId) { return ( @@ -134,8 +133,8 @@ const LastStepEndItem = ({ } if ( - (!isTeleportTx && isDepositReadyToRedeem(tx)) || - (isTeleportTx && secondRetryableLegForTeleportRequiresRedeem(tx)) + (!isTeleport && isDepositReadyToRedeem(tx)) || + (isTeleport && secondRetryableLegForTeleportRequiresRedeem(tx)) ) { return ( @@ -226,7 +225,7 @@ export const TransactionsTableDetailsSteps = ({ /> {/* Pending transfer showing the remaining time */} - {!isTeleport(tx) && ( + {!isTeleportTx(tx) && ( )} - {isTeleport(tx) && isTeleporterTransaction(tx) && ( + {isTeleportTx(tx) && ( )} diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableRowAction.tsx b/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableRowAction.tsx index 65da87e937..af4fe167ef 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableRowAction.tsx +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/TransactionsTableRowAction.tsx @@ -19,7 +19,7 @@ import { useRedeemRetryable } from '../../hooks/useRedeemRetryable' import { TransferCountdown } from '../common/TransferCountdown' import { Address } from '../../util/AddressUtils' import { getChainIdForRedeemingRetryable } from '../../util/RetryableUtils' -import { isTeleport } from '@/token-bridge-sdk/teleport' +import { isTeleportTx } from '../../hooks/useTransactions' import { useRedeemTeleporter } from '../../hooks/useRedeemTeleporter' import { sanitizeTokenSymbol } from '../../util/TokenUtils' import { formatAmount } from '../../util/NumberUtils' @@ -67,7 +67,7 @@ export function TransactionsTableRowAction({ await switchNetworkAsync?.(chainIdForRedeemingRetryable) } - if (isTeleport(tx)) { + if (isTeleportTx(tx)) { await teleporterRedeem() } else { await redeem() diff --git a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts index b5007f77a7..51d7f0001f 100644 --- a/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts +++ b/packages/arb-token-bridge-ui/src/components/TransactionHistory/helpers.ts @@ -25,11 +25,10 @@ import { AssetType } from '../../hooks/arbTokenBridge.types' import { getDepositStatus } from '../../state/app/utils' import { getBlockBeforeConfirmation } from '../../state/cctpState' import { getAttestationHashAndMessageFromReceipt } from '../../util/cctp/getAttestationHashAndMessageFromReceipt' -import { isTeleport } from '@/token-bridge-sdk/teleport' import { getOutgoingMessageState } from '../../util/withdrawals/helpers' import { getUniqueIdOrHashFromEvent } from '../../hooks/useArbTokenBridge' import { getProviderForChainId } from '../../token-bridge-sdk/utils' -import { isTeleporterTransaction } from '../../hooks/useTransactions' +import { isTeleportTx } from '../../hooks/useTransactions' const PARENT_CHAIN_TX_DETAILS_OF_CLAIM_TX = 'arbitrum:bridge:claim:parent:tx:details' @@ -639,7 +638,7 @@ export function getDestinationNetworkTxId(tx: MergedTransaction) { return tx.cctpData?.receiveMessageTransactionHash } - if (isTeleport(tx) && isTeleporterTransaction(tx)) { + if (isTeleportTx(tx)) { return tx.l2ToL3MsgData?.l3TxID } diff --git a/packages/arb-token-bridge-ui/src/components/TransferPanel/AdvancedSettings.tsx b/packages/arb-token-bridge-ui/src/components/TransferPanel/AdvancedSettings.tsx index d1f12f073c..b3d67fd1b6 100644 --- a/packages/arb-token-bridge-ui/src/components/TransferPanel/AdvancedSettings.tsx +++ b/packages/arb-token-bridge-ui/src/components/TransferPanel/AdvancedSettings.tsx @@ -213,6 +213,7 @@ export const AdvancedSettings = () => { onChange={e => setDestinationAddress(e.target.value?.toLowerCase().trim()) } + aria-label="Custom Destination Address Input" /> {isEOA && (