Skip to content

Commit

Permalink
fix(bridge): processing fee
Browse files Browse the repository at this point in the history
  • Loading branch information
shadab-taiko committed Dec 2, 2022
1 parent bbf404f commit 48f77c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions packages/bridge-ui/src/components/form/ProcessingFee.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script>
import { _ } from 'svelte-i18n';
import { processingFee } from '../../store/fee';
import { PROCESSING_FEE_META } from '../../domain/fee';
Expand All @@ -7,11 +8,11 @@
}
</script>
<div class="mt-10">
<h4 class="text-sm font-medium text-left mb-4">Processing Fees</h4>
<h4 class="text-sm font-medium text-left mb-4">{$_("bridgeForm.processingFeeLabel")}</h4>
<div class="flex items-center justify-between">

{#each Array.from(PROCESSING_FEE_META) as fee}
<button class="{$processingFee === fee[0] ? 'border-accent' : ''} btn btn-md" on:click={() => selectProcessingFee(fee[0])}>{fee[1].DisplayText}</button>
<button class="{$processingFee === fee[0] ? 'border-accent hover:border-accent' : ''} btn btn-md" on:click={() => selectProcessingFee(fee[0])}>{fee[1].DisplayText}</button>
{/each}
</div>
</div>
12 changes: 6 additions & 6 deletions packages/bridge-ui/src/domain/fee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ interface ProcessingFeeDetails {
};

const PROCESSING_FEE_META: Map<ProcessingFeeMethod, ProcessingFeeDetails> = new Map([[ProcessingFeeMethod.RECOMMENDED, {
displayText: "Recommended",
timeToConfirm: 15 * 60 * 1000,
DisplayText: "Recommended",
TimeToConfirm: 15 * 60 * 1000,
}], [ProcessingFeeMethod.CUSTOM, {
displayText: "Custom Amount",
timeToConfirm: 15 * 60 * 1000,
DisplayText: "Custom Amount",
TimeToConfirm: 15 * 60 * 1000,
}], [ProcessingFeeMethod.NONE, {
displayText: "No Fees",
timeToConfirm: 15 * 60 * 1000,
DisplayText: "No Fees",
TimeToConfirm: 15 * 60 * 1000,
}]]);

export { ProcessingFeeDetails, ProcessingFeeMethod, PROCESSING_FEE_META };

0 comments on commit 48f77c9

Please sign in to comment.