Skip to content

Commit 0c9c126

Browse files
authored
Merge pull request #980 from liquality/ext-253/gas-fee-handler
Ext 253/gas fee handler
2 parents 01a8285 + 0b035fe commit 0c9c126

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "liquality-wallet",
3-
"version": "0.83.0",
3+
"version": "0.83.1",
44
"private": true,
55
"author": "Liquality <info@liquality.io>",
66
"scripts": {

src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"manifest_version": 2,
3-
"version": "0.83.0",
3+
"version": "0.83.1",
44
"name": "__MSG_appName__",
55
"description": "__MSG_appDesc__",
66
"default_locale": "en",

src/views/Send/Send.vue

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
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'
290293
import { errorToLiqualityErrorString } from '@liquality/error-parser/dist/src/utils'
291294
import { reportLiqualityError } from '@liquality/error-parser/dist/src/reporters/index'
292295
import InfoNotification from '@/components/InfoNotification'
293-
import EthRequiredMessage from '@/components/EthRequiredMessage'
294296
295297
export 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

src/views/Send/SendNFT.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ export default {
683683
]).finally(() => {
684684
setTimeout(() => {
685685
this.updatingFees = false
686-
}, 1000);
686+
}, 1000)
687687
})
688688
}
689689
}

0 commit comments

Comments
 (0)