Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK committed Apr 24, 2024
1 parent f473ad6 commit ec6efb9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,7 @@
break;
case err instanceof ContractFunctionExecutionError:
console.error(err);
if (err.message.includes('B_INVOCATION_TOO_EARLY')) {
errorToast({
title: $t('bridge.errors.claim.too_early.title'),
message: $t('bridge.errors.claim.too_early.message'),
});
} else if (err.message.includes('B_NOT_RECEIVED')) {
if (err.message.includes('B_NOT_RECEIVED')) {
errorToast({
title: $t('bridge.errors.claim.not_received.title'),
message: $t('bridge.errors.claim.not_received.message'),
Expand Down Expand Up @@ -189,7 +184,6 @@
<h3 class="title-body-bold">{$t('transactions.claim.steps.title')}</h3>
</div>
<div class="h-sep mx-[-24px] mt-[20px]" />
{hideContinueButton}
<div class="w-full h-full f-col">
<DialogStepper>
<DialogStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$: correctChain = Number(tx.destChainId) === $connectedSourceChain.id;
$: if (correctChain && !checkingPrerequisites && hasEnoughEth && $account && preferredDelayInSeconds <= 0) {
$: if (correctChain && !checkingPrerequisites && hasEnoughEth && $account) {
hideContinueButton = false;
canContinue = true;
} else {
Expand All @@ -66,7 +66,6 @@
$: $account && tx.destChainId, checkConditions();
$: preferredDelayInSeconds = 0;
$: hasEnoughEth = false;
</script>

Expand Down Expand Up @@ -110,19 +109,5 @@
switchChains();
}}>{$t('common.switch_to')} {txDestChainName}</ActionButton>
</div>

<!-- {#if !canContinue && correctChain}
<div class="h-sep" />
<div class="f-col space-y-[16px]">
<ActionButton
onPopup
priority="primary"
disabled={$switchingNetwork}
loading={$switchingNetwork}
on:click={() => {
switchChains();
}}>{$t('common.switch_to')} {txDestChainName}</ActionButton>
</div>
{/if} -->
{/if}
</div>
19 changes: 3 additions & 16 deletions packages/bridge-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
"not_received": {
"message": "The message is not proven and cannot be claimed right now.",
"title": "Not received"
},
"too_early": {
"message": "You need to wait for the delay to pass before claiming",
"title": "Too early"
}
},
"custom_token": {
Expand Down Expand Up @@ -167,9 +163,7 @@
"processing": "Processing...",
"success": {
"claim": "Claim transaction sent successfully",
"claim_description": "You",
"prove": "Proof submitted",
"prove_description": "You have submitted your proof. Wait for the delay to pass, then you can claim your funds"
"prove": "Proof submitted"
},
"title": "Confirm"
},
Expand Down Expand Up @@ -460,22 +454,15 @@
"confirm": {
"claim_button": "Claim now",
"claim_description": "You can now claim your assets",
"proceed": "Proceed to claim",
"prove": "Submit proof",
"prove_description": "After successfully submitting your proof, wait for the cooldown delay. Then you can claim your funds."
"proceed": "Proceed to claim"
},
"pre_check": {
"chain_check": "Connected to the correct chain",
"funds_check": "Sufficient funds to claim",
"no_delay": "No delay",
"ready": "You can continue with the claim process!",
"remaining_delay": "Remaining delay before claim",
"step": "Claim step",
"switch_chain": "This transaction is bridging to <span class=\"font-bold text-primary\">{chain}</span> You need to be connected to this chain",
"title": "Requirements",
"two_step_claim": {
"description": "For your L2 to L1 transfer, a two-step claim with a <span class=\"font-bold text-primary\" >{delay}</span> waiting period in between is required. For detailed instructions, please consult our documentation."
}
"title": "Requirements"
},
"review": {
"name": "Review",
Expand Down
2 changes: 0 additions & 2 deletions packages/bridge-ui/src/libs/polling/messageStatusPoller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ const log = getLogger('bridge:messageStatusPoller');
export enum PollingEvent {
STOP = 'stop',
STATUS = 'status', // emits MessageStatus
DELAY = 'remainingDelayInSeconds', // emits remaining claim delay in seconds
PROOFRECEIPT = 'proofReceipt', // emits proof receipt

// Whether or not the tx can be clamied/retried/released
PROCESSABLE = 'processable',
Expand Down

0 comments on commit ec6efb9

Please sign in to comment.