Skip to content

Commit 5f30548

Browse files
committed
fix custom gas limit
1 parent 6543d7f commit 5f30548

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

assets/logos/leap.png

1.52 KB
Loading

components/modals/SendModal.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ watch(
163163
164164
const calcGasFee = (target) => {
165165
const gasLimit = typeof estimatedGasLimit.value === "number" ? estimatedGasLimit.value : estimatedGasLimit.value.replaceAll(" ", "")
166-
return comma((gasLimit * appStore.gas[target.toLowerCase()]).toFixed(2))
166+
return comma(((selectedGasLimit.value === 'Custom' ? Number.parseInt(customGasLimit.value.toString().replaceAll(" ", "")) : gasLimit) * appStore.gas[target.toLowerCase()]).toFixed(2))
167167
}
168168
169169
const runGasLimitEstimation = async () => {
@@ -245,7 +245,7 @@ const continueButton = computed(() => {
245245
}
246246
}
247247
248-
if (parseFloat(amount.value) === 0) {
248+
if (parseFloat(amount.value) === 0 || isNaN(parseFloat(amount.value))) {
249249
return {
250250
title: "Enter the amount",
251251
disable: true,
@@ -481,8 +481,8 @@ const handleContinue = async () => {
481481
placeholder="0.00"
482482
/>
483483
484-
<Flex direction="column" gap="12" style="opacity: 0.3; pointer-events: none">
485-
<Flex direction="column" gap="8">
484+
<Flex direction="column" gap="12">
485+
<Flex direction="column" gap="8" :style="appStore.wallet !== 'leap' && { pointerEvents: 'none', opacity: 0.3 }">
486486
<Text size="12" weight="600" color="secondary">Gas Fees</Text>
487487
488488
<Flex align="center" justify="between" gap="12">

0 commit comments

Comments
 (0)