Skip to content

Commit

Permalink
fix fee
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK committed May 27, 2024
1 parent 3bfd277 commit 97dbc02
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { tick } from 'svelte';
import { t } from 'svelte-i18n';
import { formatEther } from 'viem';
import { formatEther, formatGwei } from 'viem';
import FlatAlert from '$components/Alert/FlatAlert.svelte';
import { processingFee, processingFeeMethod } from '$components/Bridge/state';
Expand Down Expand Up @@ -90,6 +90,10 @@
if (tempProcessingFeeMethod !== ProcessingFeeMethod.CUSTOM) return;
const { value } = event.target as HTMLInputElement;
if (parseToWei(value) <= 0) {
// If the user tries to input 0 or less, we set it to 1 gwei
inputBox?.setValue(formatGwei(1n));
}
tempprocessingFee = parseToWei(value);
}
Expand Down

0 comments on commit 97dbc02

Please sign in to comment.