+ I understand that ~{confirmationPeriod} is an estimate,
+ and it's possible the committee fails and it will
+ default back to the 8 days.{' '}
+
+ Learn more.
+
+
+ }
+ checked={checkbox3Checked}
+ onChange={setCheckbox3Checked}
+ />
+ )}
From ab840afb2a4ff5a2e33d2730b10e4cb9d163c92f Mon Sep 17 00:00:00 2001
From: Doug <4741454+douglance@users.noreply.github.com>
Date: Mon, 14 Oct 2024 14:19:06 -0400
Subject: [PATCH 5/6] remove e2e changes
---
.../tests/e2e/specs/withdrawCctp.cy.ts | 6 +-----
.../tests/e2e/specs/withdrawERC20.cy.ts | 12 ------------
.../tests/e2e/specs/withdrawETH.cy.ts | 6 ------
3 files changed, 1 insertion(+), 23 deletions(-)
diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts
index 19fbd0bed4..e1e062f1c4 100644
--- a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts
+++ b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawCctp.cy.ts
@@ -34,11 +34,7 @@ export const confirmAndApproveCctpWithdrawal = () => {
})
.should('be.visible')
.click()
- cy.findByRole('switch', {
- name: /possible the committee fails/i
- })
- .should('be.visible')
- .click()
+
cy.findByRole('button', {
name: /Continue/i
})
diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts
index 89fa9988a9..54233ff35b 100644
--- a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts
+++ b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawERC20.cy.ts
@@ -119,12 +119,6 @@ describe('Withdraw ERC20 Token', () => {
})
.should('be.visible')
.click()
-
- cy.findByRole('switch', {
- name: /possible the committee fails/i
- })
- .should('be.visible')
- .click()
// the Continue withdrawal button should not be disabled now
cy.findByRole('button', {
name: /Continue/i
@@ -239,12 +233,6 @@ describe('Withdraw ERC20 Token', () => {
})
.should('be.visible')
.click()
-
- cy.findByRole('switch', {
- name: /possible the committee fails/i
- })
- .should('be.visible')
- .click()
// the Continue withdrawal button should not be disabled now
cy.findByRole('button', {
name: /Continue/i
diff --git a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawETH.cy.ts b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawETH.cy.ts
index 93d532d461..1f45382c16 100644
--- a/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawETH.cy.ts
+++ b/packages/arb-token-bridge-ui/tests/e2e/specs/withdrawETH.cy.ts
@@ -72,12 +72,6 @@ describe('Withdraw ETH', () => {
})
.should('be.visible')
.click()
-
- cy.findByRole('switch', {
- name: /possible the committee fails/i
- })
- .should('be.visible')
- .click()
// the Continue withdrawal button should not be disabled now
cy.findByRole('button', {
name: /Continue/i
From 3cefb00d64c30438862d8a47f02041ca029d2fa5 Mon Sep 17 00:00:00 2001
From: Doug <4741454+douglance@users.noreply.github.com>
Date: Mon, 14 Oct 2024 14:26:24 -0400
Subject: [PATCH 6/6] adds default testnet time
---
packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts b/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts
index 9a7b50e5db..abbf5b9490 100644
--- a/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts
+++ b/packages/arb-token-bridge-ui/src/util/WithdrawalUtils.ts
@@ -10,6 +10,7 @@ import { GasEstimates } from '../hooks/arbTokenBridge.types'
import { Address } from './AddressUtils'
import { captureSentryErrorWithExtraData } from './SentryUtils'
import { getBridgeUiConfigForChain } from './bridgeUiConfig'
+import { isNetwork } from './networks'
export async function withdrawInitTxEstimateGas({
amount,
@@ -112,6 +113,7 @@ const SECONDS_IN_HOUR = 3600
const SECONDS_IN_DAY = 86400
const DEFAULT_CONFIRMATION_TIME = 7 * SECONDS_IN_DAY
const DEFAULT_FAST_WITHDRAWAL_TIME = SECONDS_IN_DAY
+const DEFAULT_TESTNET_CONFIRMATION_TIME = SECONDS_IN_HOUR
function formatDuration(seconds: number): string {
if (seconds < SECONDS_IN_MINUTE) return `${seconds} seconds`
@@ -129,6 +131,7 @@ function formatDuration(seconds: number): string {
export function getConfirmationTime(chainId: number) {
const { fastWithdrawalTime, fastWithdrawalActive } =
getBridgeUiConfigForChain(chainId)
+ const isTestnet = isNetwork(chainId).isTestnet
const isDefaultConfirmationTime = !fastWithdrawalActive
const isDefaultFastWithdrawal = fastWithdrawalActive && !fastWithdrawalTime
@@ -141,7 +144,9 @@ export function getConfirmationTime(chainId: number) {
} else if (isCustomFastWithdrawal) {
confirmationTimeInSeconds = fastWithdrawalTime / 1000
} else {
- confirmationTimeInSeconds = DEFAULT_CONFIRMATION_TIME
+ confirmationTimeInSeconds = isTestnet
+ ? DEFAULT_TESTNET_CONFIRMATION_TIME
+ : DEFAULT_CONFIRMATION_TIME
}
const confirmationTimeInReadableFormat = formatDuration(