Skip to content

Commit

Permalink
fix: show custom token alert
Browse files Browse the repository at this point in the history
  • Loading branch information
JackHamer09 committed May 23, 2024
1 parent 4c31dc2 commit 3e22241
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions views/transactions/Deposit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,7 @@
</transition>
<CommonButtonLabel v-if="!isCustomNode" as="span" class="ml-auto text-right">~15 minutes</CommonButtonLabel>
</div>
<transition v-bind="TransitionAlertScaleInOutTransition">
<CommonAlert v-if="!enoughBalanceToCoverFee" class="mt-4" variant="error" :icon="ExclamationTriangleIcon">
<p>
Insufficient <span class="font-medium">{{ feeToken?.symbol }}</span> balance on
<span class="font-medium">{{ destinations.ethereum.label }}</span> to cover the fee
</p>
<NuxtLink :to="{ name: 'receive-methods' }" class="alert-link">Receive funds</NuxtLink>
</CommonAlert>
</transition>
<transition v-bind="TransitionAlertScaleInOutTransition">
<transition v-bind="TransitionAlertScaleInOutTransition" mode="out-in">
<CommonAlert
v-if="recommendedBalance && feeToken"
class="mt-4"
Expand All @@ -213,6 +204,18 @@
</p>
<NuxtLink :to="{ name: 'receive-methods' }" class="alert-link">Receive funds</NuxtLink>
</CommonAlert>
<CommonAlert
v-else-if="!enoughBalanceToCoverFee"
class="mt-4"
variant="error"
:icon="ExclamationTriangleIcon"
>
<p>
Insufficient <span class="font-medium">{{ feeToken?.symbol }}</span> balance on
<span class="font-medium">{{ destinations.ethereum.label }}</span> to cover the fee
</p>
<NuxtLink :to="{ name: 'receive-methods' }" class="alert-link">Receive funds</NuxtLink>
</CommonAlert>
</transition>
<CommonErrorBlock v-if="allowanceRequestError" class="mt-2" @try-again="requestAllowance">
Checking allowance error: {{ allowanceRequestError.message }}
Expand Down Expand Up @@ -455,9 +458,6 @@ const tokenCustomBridge = computed(() => {
const customBridgeToken = customBridgeTokens.find(
(e) => eraNetwork.value.l1Network?.id === e.chainId && e.l1Address === selectedToken.value?.address
);
if (!customBridgeToken?.bridges.some((e) => e.depositUrl)) {
return undefined;
}
return customBridgeToken;
});
const amountInputTokenAddress = computed({
Expand Down

0 comments on commit 3e22241

Please sign in to comment.