From fe08d661dcb21eb6a253791f0246fafb72adf77b Mon Sep 17 00:00:00 2001 From: Ivanov N Date: Thu, 26 Dec 2024 22:13:34 +0300 Subject: [PATCH] fixes per comments --- src/components/SendFundsForm.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/SendFundsForm.vue b/src/components/SendFundsForm.vue index 32382795b..141e8a5b4 100644 --- a/src/components/SendFundsForm.vue +++ b/src/components/SendFundsForm.vue @@ -198,6 +198,8 @@ import QrcodeCapture from '@/components/QrcodeCapture.vue' import QrcodeScannerDialog from '@/components/QrcodeScannerDialog.vue' import get from 'lodash/get' import { BigNumber } from 'bignumber.js' +import * as transactions from '@klayr/transactions' +import { KLY_DECIMALS } from '@/lib/klayr/klayr-constants' import { INCREASE_FEE_MULTIPLIER, @@ -532,7 +534,9 @@ export default { const isKlyTransfer = this.currency === Cryptos.KLY if (!isKlyTransfer) return true const MAX_UINT64 = BigInt('18446744073709551615') - const isKlyTransferAllowed = isKlyTransfer && this.transferFee && v < MAX_UINT64 + const isKlyTransferAllowed = + this.transferFee && + transactions.convertklyToBeddows(v.toFixed(KLY_DECIMALS)) < MAX_UINT64 return isKlyTransferAllowed || this.$t('transfer.error_incorrect_amount') } ]