Skip to content

Commit

Permalink
add warning if fee calculation was not possible
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK committed Apr 11, 2024
1 parent dc97190 commit 7fad830
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
{#if calculatingRecommendedAmount}
<LoadingText mask="0.0017730224073" /> ETH
{:else if errorCalculatingRecommendedAmount}
{$t('processing_fee.recommended.error')}
<FlatAlert type="warning" message={$t('processing_fee.recommended.error')} />
{:else}
{formatEther($processingFee ?? BigInt(0))} ETH {#if $processingFee !== recommendedAmount}
<span class="text-primary-link">| {$t('common.customized')}</span>
Expand All @@ -153,7 +153,7 @@
{#if calculatingRecommendedAmount}
<LoadingText mask="0.0017730224073" />
{:else if errorCalculatingRecommendedAmount}
{$t('processing_fee.recommended.error')}
<span class="text-warning-sentiment">{$t('processing_fee.recommended.error')}</span>
{:else}
{formatEther($processingFee ?? BigInt(0))} ETH {#if $processingFee !== recommendedAmount}
<span class="text-primary-link">| {$t('common.customized')}</span>
Expand All @@ -179,7 +179,7 @@
{#if calculatingRecommendedAmount}
<LoadingText mask="0.0001" /> ETH
{:else if errorCalculatingRecommendedAmount}
{$t('processing_fee.recommended.error')}
<FlatAlert type="warning" message={$t('processing_fee.recommended.error')} />
{:else}
{formatEther($processingFee ?? BigInt(0))} ETH {#if $processingFee !== recommendedAmount}
<span class="text-primary-link">| {$t('common.customized')}</span>
Expand Down Expand Up @@ -212,7 +212,7 @@
{#if calculatingRecommendedAmount}
<LoadingText mask="0.0001" /> ETH
{:else if errorCalculatingRecommendedAmount}
{$t('processing_fee.recommended.error')}
<FlatAlert type="warning" message={$t('processing_fee.recommended.error')} />
{:else}
{formatEther(recommendedAmount)} ETH
{/if}
Expand Down Expand Up @@ -299,7 +299,10 @@
</div>
{/if}

<RecommendedFee bind:amount={recommendedAmount} bind:calculating={calculatingRecommendedAmount} />
<RecommendedFee
bind:amount={recommendedAmount}
bind:calculating={calculatingRecommendedAmount}
bind:error={errorCalculatingRecommendedAmount} />

<NoneOption
bind:enoughEth={hasEnoughEth}
Expand Down
14 changes: 7 additions & 7 deletions packages/bridge-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,15 @@
"ok": "Okay",
"recipient": "Recipient",
"review": "Review",
"see_results": "See results",
"sender": "Sender",
"status": "Status",
"success": "Success",
"switch_to": "Switch to",
"symbol": "Symbol",
"to": "To",
"token_id": "Token ID",
"token_standard": "Token standard",
"see_results": "See results"
"token_standard": "Token standard"
},
"custom_recipient": {
"placeholder": "Add custom recipient"
Expand Down Expand Up @@ -358,6 +358,10 @@
"token": "Token",
"transactions": "Transactions"
},
"paginator": {
"of": "of",
"page": "Page"
},
"paused_modal": {
"description": "The bridge is currently not available. Follow our official communication channels for more information. ",
"title": "Bridge under maintenance!"
Expand All @@ -381,7 +385,7 @@
},
"recommended": {
"calculating": "Calculating",
"error": "Error calculating",
"error": "Error calculating processing fee, you will need to claim manually!",
"label": "Recommended"
},
"title": "Processing fee",
Expand Down Expand Up @@ -565,9 +569,5 @@
"connecting": "Connecting",
"disconnected": "Disconnected"
}
},
"paginator": {
"page": "Page",
"of": "of"
}
}

0 comments on commit 7fad830

Please sign in to comment.