99 {{ $t('common.send') }}
1010 </NavBar >
1111 <InfoNotification v-if =" nativeAssetRequired" >
12- <EthRequiredMessage :account-id =" account.id" :action =" 'send'" />
12+ {{ $t('components.noFundsForNetworkFee.noEnoughAsset', { asset: assetChain }) }}
13+ <router-link :to =" accountUrl" class =" btn btn-option get-bridgeAsset-btn" >
14+ {{ $t('common.get') }} {{ assetChain }}
15+ </router-link >
1316 </InfoNotification >
1417 <InfoNotification v-else-if =" !isValidSendAmount" >
1518 {{ `${$t('common.minSendAmount')} ${minimumAssetSendAmount} ${asset}` }}
@@ -290,7 +293,6 @@ import { UNSResolver } from '@liquality/wallet-core/dist/src/nameResolvers/uns'
290293import { errorToLiqualityErrorString } from ' @liquality/error-parser/dist/src/utils'
291294import { reportLiqualityError } from ' @liquality/error-parser/dist/src/reporters/index'
292295import InfoNotification from ' @/components/InfoNotification'
293- import EthRequiredMessage from ' @/components/EthRequiredMessage'
294296
295297export default {
296298 components: {
@@ -303,8 +305,7 @@ export default {
303305 LedgerSignRequestModal,
304306 CustomFees,
305307 CustomFeesEIP1559,
306- InfoNotification,
307- EthRequiredMessage
308+ InfoNotification
308309 },
309310 mixins: [ledgerConnectMixin],
310311 data () {
@@ -351,6 +352,9 @@ export default {
351352 ... mapState ([' activeNetwork' , ' activeWalletId' , ' fees' , ' fiatRates' ]),
352353 ... mapGetters (' app' , [' ledgerBridgeReady' ]),
353354 ... mapGetters ([' accountItem' , ' client' , ' suggestedFeePrices' ]),
355+ accountUrl () {
356+ return ` /accounts/${ this .accountId } /${ this .nativeAsset } /receive`
357+ },
354358 account () {
355359 return this .accountItem (this .accountId )
356360 },
@@ -470,12 +474,14 @@ export default {
470474 return true
471475 }
472476
473- const nativeAssetBalance = this .networkWalletBalances [this .assetChain ]
474- if (
475- ! nativeAssetBalance ||
476- BN (nativeAssetBalance).lte (0 ) ||
477- BN (nativeAssetBalance).minus (BN (this .currentFee )).lt (0 )
478- ) {
477+ const balance = this .networkWalletBalances [this .assetChain ]
478+
479+ if (! balance) {
480+ return true
481+ }
482+
483+ const nativeAssetBalance = unitToCurrency (cryptoassets[this .assetChain ], BN (balance))
484+ if (nativeAssetBalance .lte (0 ) || nativeAssetBalance .minus (BN (this .currentFee )).lte (0 )) {
479485 return true
480486 }
481487 return false
@@ -552,6 +558,7 @@ export default {
552558 getAssetIcon,
553559 getAssetColorStyle,
554560 shortenAddress,
561+ getNativeAsset,
555562 updateSendAmount (newValue ) {
556563 if (newValue && ! isNaN (newValue)) {
557564 this .stateAmount = newValue
0 commit comments