88 >
99 {{ $t('common.send') }}
1010 </NavBar >
11- <InfoNotification v-if =" nativeAssetRequired || !isValidSendAmount " >
12- <EthRequiredMessage v-if = " nativeAssetRequired " :account-id =" account.id" :action =" 'send'" />
13- < template v-else >
14- {{ `${$t('common.minSendAmount')} ${minimumAssetSendAmount} ${asset}` }}
15- </ template >
11+ <!-- < InfoNotification v-if="nativeAssetRequired">
12+ <EthRequiredMessage :account-id="account.id" :action="'send'" />
13+ </InfoNotification> -- >
14+ < InfoNotification v-if = " !isValidSendAmount " >
15+ {{ `${$t('common.minSendAmount')} ${minimumAssetSendAmount} ${asset}` }}
1616 </InfoNotification >
1717 <div class =" wrapper form" >
1818 <div class =" wrapper_top" >
2323 :amount-fiat =" amountFiat"
2424 @update:amount =" (newAmount) => (amount = newAmount)"
2525 @toggle-max =" toggleMaxAmount"
26- @update:amountFiat =" updateSendAmount "
26+ @update:amountFiat =" (newAmount) => (amountFiat = newAmount) "
2727 :max =" available"
2828 :available =" available"
2929 :max-fiat =" prettyFiatBalance(available, fiatRates[asset])"
131131 class =" btn btn-primary btn-lg"
132132 id =" send_review_button"
133133 @click =" review"
134- :disabled =" !canSend || !isValidSendAmount "
134+ :disabled =" !canSend"
135135 >
136136 {{ $t('common.review') }}
137137 </button >
@@ -289,7 +289,7 @@ import { UNSResolver } from '@liquality/wallet-core/dist/src/nameResolvers/uns'
289289import { errorToLiqualityErrorString } from ' @liquality/error-parser/dist/src/utils'
290290import { reportLiqualityError } from ' @liquality/error-parser/dist/src/reporters/index'
291291import InfoNotification from ' @/components/InfoNotification'
292- import EthRequiredMessage from ' @/components/EthRequiredMessage'
292+ // import EthRequiredMessage from '@/components/EthRequiredMessage'
293293
294294export default {
295295 components: {
@@ -303,7 +303,7 @@ export default {
303303 CustomFees,
304304 CustomFeesEIP1559,
305305 InfoNotification,
306- EthRequiredMessage
306+ // EthRequiredMessage
307307 },
308308 mixins: [ledgerConnectMixin],
309309 data () {
@@ -351,19 +351,23 @@ export default {
351351 return this .account ? .balances
352352 },
353353 minimumAssetSendAmount () {
354- return this .minimumAssetsSendAmounts [this .asset ] || 0
354+ return this .minimumAssetsSendAmounts [this .asset ] || 0.0
355355 },
356356 isValidSendAmount () {
357- return this .stateAmount >= this .minimumAssetSendAmount
357+ const amount = BN (this .stateAmount )
358+ if (amount .eq (0 )) {
359+ debugger
360+ return true
361+ }
362+ debugger
363+ return amount .gte (BN (this .minimumAssetSendAmount ))
358364 },
359365 amount: {
360366 get () {
361- return this .stateAmount
367+ return this .stateAmount // crypto value
362368 },
363369 set (newValue ) {
364- this .$nextTick (() => {
365- this .updateSendAmount (newValue)
366- })
370+ this .updateSendAmount (newValue)
367371 }
368372 },
369373 amountFiat: {
@@ -374,14 +378,14 @@ export default {
374378 if (! newValue) {
375379 // keep it as a number instead of string, otherwise the placeholder of input won't appear
376380 this .stateAmountFiat = 0.0
377- this .stateAmount = 0.0
378381 } else {
379382 this .stateAmountFiat = newValue
380- this .stateAmount = fiatToCrypto (
381- this .stateAmountFiat ? .replaceAll (' ,' , ' ' ),
382- this .fiatRates [this .asset ]
383- )
384383 }
384+
385+ this .stateAmount = fiatToCrypto (
386+ this .stateAmountFiat ? .replaceAll (' ,' , ' ' ),
387+ this .fiatRates [this .asset ]
388+ )
385389 }
386390 },
387391 balance () {
@@ -470,6 +474,7 @@ export default {
470474 ! this .nativeAssetRequired &&
471475 this .address &&
472476 ! this .addressError &&
477+ BN (this .amount ).gte (BN (this .minimumAssetSendAmount )) &&
473478 BN (this .amount ).gt (0 ) &&
474479 ! this .amountError
475480 ) {
@@ -538,7 +543,7 @@ export default {
538543 if (newValue && ! isNaN (newValue)) {
539544 this .stateAmount = newValue
540545 } else {
541- this .stateAmount = this . minimumAssetSendAmount
546+ this .stateAmount = 0.0
542547 }
543548 this .stateAmountFiat = prettyFiatBalance (this .stateAmount , this .fiatRates [this .asset ])
544549 },
@@ -743,11 +748,6 @@ export default {
743748 label: ` ${ this .asset } `
744749 }
745750 })
746-
747- // Set Asset minimum send Amount
748- this .$nextTick (() => {
749- this .stateAmount = this .minimumAssetSendAmount || 0.0
750- })
751751 },
752752 watch: {
753753 selectedFee: {
0 commit comments