Skip to content

Commit

Permalink
feat: update withdrawal delay information (#220)
Browse files Browse the repository at this point in the history
Co-authored-by: bxpana <42230936+bxpana@users.noreply.github.com>
  • Loading branch information
tx-nikola and bxpana authored Feb 19, 2025
1 parent c28caf5 commit 8751bc1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion components/transaction/TransactionProgress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</span>
</div>
<div v-if="expectedCompleteTimestamp && !completed">
<span class="text-neutral-400">Time: </span>
<span class="text-neutral-400">Estimated time: </span>
<CommonTimer format="human-readable" :future-date="expectedCompleteTimestamp">
<template #default="{ timer, isTimerFinished }">
<template v-if="isTimerFinished">Funds should arrive soon!</template>
Expand Down
2 changes: 1 addition & 1 deletion store/zksync/transactionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type TransactionInfo = {
};

export const ESTIMATED_DEPOSIT_DELAY = 15 * 60 * 1000; // 15 minutes
export const WITHDRAWAL_DELAY = 24 * 60 * 60 * 1000; // 24 hours
export const WITHDRAWAL_DELAY = 5 * 60 * 60 * 1000; // 5 hours

export const useZkSyncTransactionStatusStore = defineStore("zkSyncTransactionStatus", () => {
const onboardStore = useOnboardStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Feature: Withdraw
Then Element with "text" "ETH" should be "visible"
Then Element with "text" " Continue " should be "disabled"
Then Element with "text" " Continue " should be "visible"
# Arriving in ~24 hours link
Then Element with "text" " Arriving in ~24 hours " should be "visible"
Then Element with "text" " Arriving in ~24 hours " should be "clickable"
# Arriving in ~5+ hours link
Then Element with "text" " Arriving in ~5+ hours " should be "visible"
Then Element with "text" " Arriving in ~5+ hours " should be "clickable"
When I choose "ETH" as token and insert "0.0000000001" as amount
Then Element with "text" " Continue " should be "clickable"

Expand All @@ -54,8 +54,8 @@ Feature: Withdraw
Then Modal card element with the "//*[@src='https://firebasestorage.googleapis.com/v0/b/token-library.appspot.com/o/eth.svg?alt=media&token=1985e3d8-3aa7-4d04-8839-565d4c341615']" xpath should be "visible"
Then Modal card element with the "//*[contains(@class,'fee-details-container') and //span[contains(text(),'Fee')]]" xpath should be "visible"
Then Modal card element with the "//*[contains(@class,'fee-details-container') and //span[contains(text(),'Total to pay')]]" xpath should be "visible"
Then Modal card element with the "//*[text()=' Arriving in ~24 hours ']" xpath should be "visible"
Then Modal card element with the "//*[text()=' Arriving in ~24 hours ']" xpath should be "clickable"
Then Modal card element with the "//*[text()=' Arriving in ~5+ hours ']" xpath should be "visible"
Then Modal card element with the "//*[text()=' Arriving in ~5+ hours ']" xpath should be "clickable"
Then Element with "text" "Send to Ethereum Goerli Testnet" should be "visible"
Then Element with "text" "Send to Ethereum Goerli Testnet" should be "clickable"

Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/features/redirection/mainPage/redirection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ Feature: External Redirection on the Main Page
Given I go to page "/transaction/zksync/era/withdraw"
When I click by "text" with "Your account" value
When I confirm the network switching
Then Element with "text" " Arriving in ~24 hours " should be "visible"
When I click by "text" with " Arriving in ~24 hours " value
Then Element with "text" " Arriving in ~24 hours " should be "clickable"
Then Element with "text" " Arriving in ~5+ hours " should be "visible"
When I click by "text" with " Arriving in ~5+ hours " value
Then Element with "text" " Arriving in ~5+ hours " should be "clickable"
Then New page has "https://era.zksync.io/docs/reference/troubleshooting/withdrawal-delay.html#withdrawal-delay" address

@id1565
Expand All @@ -324,7 +324,7 @@ Feature: External Redirection on the Main Page
When I choose "ETH" as token and insert "0.0001" as amount
When I click by text " Continue "
Then Element with "text" "Confirm transaction" should be "visible"
Then Modal card element with the "//*[text()=' Arriving in ~24 hours ']" xpath should be "visible"
When I click by the "//*[text()=' Arriving in ~24 hours ']" text element on the Modal card
Then Modal card element with the "//*[text()=' Arriving in ~5+ hours ']" xpath should be "visible"
When I click by the "//*[text()=' Arriving in ~5+ hours ']" text element on the Modal card
Then New page has "https://era.zksync.io/docs/reference/troubleshooting/withdrawal-delay.html#withdrawal-delay" address


4 changes: 2 additions & 2 deletions tests/e2e/features/transactions/withdraw.feature
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Feature: Withdraw
Then Element with "text" " Your funds will be available on the " should be "visible"
Then Element with "text" "Ethereum Goerli Testnet" should be "visible"
Then Element with "text" " after a " should be "visible"
Then Element with "text" "~24-hour delay" should be "visible"
Then Element with "text" "~5+ hour delay" should be "visible"
Then Element with "text" ". During this time, the transaction will be processed and finalized. You are free to close this page. " should be "visible"
Then Element with "text" " Learn more " should be "visible"
Then Element with "text" " Learn more " should be "clickable"
Expand Down Expand Up @@ -113,4 +113,4 @@ Feature: Withdraw
Then Element with "partial src" "eth.svg" should be "visible"
Then Element with "text" "ETH" should be "visible"
Then Element with "text" "<$0.01" should be "visible"


8 changes: 4 additions & 4 deletions views/transactions/Transfer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<p v-if="!isCustomNode">
After a
<a class="underline underline-offset-2" :href="ZKSYNC_WITHDRAWAL_DELAY" target="_blank"
>24-hour withdrawal delay</a
>~5+ hour withdrawal delay</a
>, you will need to manually claim your funds which requires paying another transaction fee on
{{ eraNetwork.l1Network?.name }}. Alternatively you can use
<a
Expand Down Expand Up @@ -150,11 +150,11 @@
class="mb-block-padding-1/2 sm:mb-block-gap"
>
<p v-if="withdrawalManualFinalizationRequired">
You will be able to claim your withdrawal only after a 24-hour withdrawal delay.
You will be able to claim your withdrawal only after a 5+ hour withdrawal delay.
<a class="underline underline-offset-2" :href="ZKSYNC_WITHDRAWAL_DELAY" target="_blank">Learn more</a>
</p>
<p v-else>
You will receive funds only after a 24-hour withdrawal delay.
You will receive funds only after a 5+ hour withdrawal delay.
<a class="underline underline-offset-2" :href="ZKSYNC_WITHDRAWAL_DELAY" target="_blank">Learn more</a>
</p>
</CommonAlert>
Expand Down Expand Up @@ -211,7 +211,7 @@
target="_blank"
class="ml-auto text-right"
>
Up to 24 hours
5+ hours
</CommonButtonLabel>
<CommonButtonLabel v-else-if="type === 'transfer'" as="span" class="ml-auto text-right">
Almost instant
Expand Down
3 changes: 2 additions & 1 deletion views/transactions/WithdrawalSubmitted.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
</template>
<template v-else>
Your funds will be available on <span class="font-medium">{{ transaction.to.destination.label }}</span> after
the <a class="underline underline-offset-2" :href="ZKSYNC_WITHDRAWAL_DELAY" target="_blank">24-hour delay</a>.
the
<a class="underline underline-offset-2" :href="ZKSYNC_WITHDRAWAL_DELAY" target="_blank">~5+ hour delay</a>.
During this time, the transaction will be processed
{{
withdrawalManualFinalizationRequired
Expand Down

0 comments on commit 8751bc1

Please sign in to comment.