Skip to content

Commit

Permalink
updates to latest designs
Browse files Browse the repository at this point in the history
  • Loading branch information
douglance committed Oct 7, 2024
1 parent 77c5756 commit ae9a3e2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import { useAppState } from '../../state'
import { trackEvent } from '../../util/AnalyticsUtils'
import { getNetworkName, isNetwork } from '../../util/networks'
import { getFastBridges } from '../../util/fastBridges'
import { CONFIRMATION_PERIOD_ARTICLE_LINK } from '../../constants'
import {
CONFIRMATION_PERIOD_ARTICLE_LINK,
FAST_WITHDRAWAL_DOCS_ARTICLE_LINK
} from '../../constants'
import { useNativeCurrency } from '../../hooks/useNativeCurrency'
import { useNetworks } from '../../hooks/useNetworks'
import { useNetworksRelationship } from '../../hooks/useNetworksRelationship'
Expand Down Expand Up @@ -63,9 +66,11 @@ export function WithdrawalConfirmationDialog(

const [checkbox1Checked, setCheckbox1Checked] = useState(false)
const [checkbox2Checked, setCheckbox2Checked] = useState(false)
const [checkbox3Checked, setCheckbox3Checked] = useState(false)

const { isArbitrumOne } = isNetwork(childChain.id)
const bothCheckboxesChecked = checkbox1Checked && checkbox2Checked
const bothCheckboxesChecked =
checkbox1Checked && checkbox2Checked && checkbox3Checked

const estimatedConfirmationDate = getWithdrawalConfirmationDate({
createdAt: null,
Expand All @@ -81,6 +86,7 @@ export function WithdrawalConfirmationDialog(

setCheckbox1Checked(false)
setCheckbox2Checked(false)
setCheckbox3Checked(false)
setSelectedIndex(0)
}

Expand Down Expand Up @@ -157,6 +163,24 @@ export function WithdrawalConfirmationDialog(
onChange={setCheckbox2Checked}
/>

<Checkbox
label={
<span className="font-light">
I understand that ~{confirmationPeriod} is an estimate,
and it&apos;s possible the committee fails and it will
default back to the 8 days.{' '}
<ExternalLink
href={FAST_WITHDRAWAL_DOCS_ARTICLE_LINK}
className="underline"
>
Learn more.
</ExternalLink>
</span>
}
checked={checkbox3Checked}
onChange={setCheckbox3Checked}
/>

<div className="flex">
<SecurityGuaranteed />
</div>
Expand Down
2 changes: 2 additions & 0 deletions packages/arb-token-bridge-ui/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const ETH_BALANCE_ARTICLE_LINK = `${SUPPORT_LINK_BASE}/hc/en-us/articles/

export const CONFIRMATION_PERIOD_ARTICLE_LINK = `${SUPPORT_LINK_BASE}/hc/en-us/articles/18213843096091`

export const FAST_WITHDRAWAL_DOCS_ARTICLE_LINK = `${DOCS_DOMAIN}/run-arbitrum-node/arbos-releases/arbos31#additional-requirement-for-arbitrum-orbit-chains-who-wish-to-enable-fast-withdrawals`

export const ORBIT_QUICKSTART_LINK =
'https://docs.arbitrum.io/launch-orbit-chain/orbit-quickstart'

Expand Down
4 changes: 3 additions & 1 deletion packages/arb-token-bridge-ui/src/util/orbitChainsData.json
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@
"name": "RARI Testnet",
"description": "A testnet chain designed specifically for NFT royalties and creator empowerment.",
"logo": "/images/RARIMainnetLogo.svg"
}
},
"fastWithdrawalTime": 1800000,
"fastWithdrawalActive": true
}
},
"1183": {
Expand Down

0 comments on commit ae9a3e2

Please sign in to comment.