diff --git a/package.json b/package.json index 76b9512f1..3a3d584e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquality-wallet", - "version": "0.83.0", + "version": "0.83.2", "private": true, "author": "Liquality ", "scripts": { @@ -29,7 +29,7 @@ "@liquality/ethereum-utils": "^1.13.12", "@liquality/terra-networks": "^1.13.12", "@liquality/types": "^1.13.12", - "@liquality/wallet-core": "4.6.0", + "@liquality/wallet-core": "4.8.0", "@terra-money/terra.js": "^3.1.6", "@testing-library/vue": "^5.8.2", "amplitude-js": "8.18.2", diff --git a/src/assets/icons/edit_icon.svg b/src/assets/icons/edit_icon.svg new file mode 100644 index 000000000..52f84f351 --- /dev/null +++ b/src/assets/icons/edit_icon.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/locales/cb/pages.json b/src/locales/cb/pages.json index db523c0dc..b6af79d87 100644 --- a/src/locales/cb/pages.json +++ b/src/locales/cb/pages.json @@ -163,6 +163,7 @@ "eyeInstructions": "Ipahilayo kini gikan sa mga mata sa uban!", "exportLedger": "Dili ma-export gikan sa usa ka Ledger account", "createAccount": "Paghimo og Account", + "editAccount": "Edit Account", "selectNetwork": "Pili ug Network", "chooseAccountName": "Pilia ang Ngalan sa Account", "accountAliasErrorFiveChars": "Ang ngalan kinahanglan adunay 5 o labaw pa nga mga karakter", diff --git a/src/locales/en/pages.json b/src/locales/en/pages.json index bf3d800e5..24c023c0e 100644 --- a/src/locales/en/pages.json +++ b/src/locales/en/pages.json @@ -163,6 +163,7 @@ "eyeInstructions": "Keep this away from prying eyes!", "exportLedger": "Cannot export from a Ledger account", "createAccount": "Create Account", + "editAccount": "Edit Account", "selectNetwork": "Select Network", "chooseAccountName": "Choose Account Name", "accountAliasErrorFiveChars": "Name should have 5 or more characters", diff --git a/src/locales/es/pages.json b/src/locales/es/pages.json index 4be38fac2..5fe50871a 100644 --- a/src/locales/es/pages.json +++ b/src/locales/es/pages.json @@ -163,6 +163,7 @@ "eyeInstructions": "¡Mantén esto alejado de miradas indiscretas!", "exportLedger": "No se puede exportar de una cuenta de Ledger", "createAccount": "Crear Cuenta", + "editAccount": "Editar Cuenta", "selectNetwork": "Selecionar Red", "chooseAccountName": "Elige un Nombre de Cuenta", "accountAliasErrorFiveChars": "El nombre debe tener 5 o más caracteres", diff --git a/src/locales/ph/pages.json b/src/locales/ph/pages.json index d2bcf47ad..edae5ad5e 100644 --- a/src/locales/ph/pages.json +++ b/src/locales/ph/pages.json @@ -163,6 +163,7 @@ "eyeInstructions": "Maging mapagmatyag sa mga nanunuod sa paligid", "exportLedger": "Hindi ma-export mula sa isang Ledger account", "createAccount": "Gumawa ng Account", + "editAccount": "Edit Account", "selectNetwork": "Pumili ng Network", "chooseAccountName": "Pumili ng Account Name", "accountAliasErrorFiveChars": "Dapat may 5 o higit pang character ang pangalan", diff --git a/src/locales/pt/pages.json b/src/locales/pt/pages.json index d6c2152d2..082872a12 100644 --- a/src/locales/pt/pages.json +++ b/src/locales/pt/pages.json @@ -163,6 +163,7 @@ "eyeInstructions": "Mantenha a salvo!", "exportLedger": "Não é possível exportar de uma conta Ledger", "createAccount": "Criar Conta", + "editAccount": "Edit Account", "selectNetwork": "Selecionar Rede", "chooseAccountName": "Escolha o Nome da Conta", "accountAliasErrorFiveChars": "O nome deve ter 5 ou mais caracteres", diff --git a/src/locales/zh/pages.json b/src/locales/zh/pages.json index 463931ae1..0d030f15b 100644 --- a/src/locales/zh/pages.json +++ b/src/locales/zh/pages.json @@ -163,6 +163,7 @@ "eyeInstructions": "别让他人看到", "exportLedger": "不能从Ledger账户导出", "createAccount": "创建新账户", + "editAccount": "Edit Account", "selectNetwork": "选择网络", "chooseAccountName": "选择账户名称", "accountAliasErrorFiveChars": "名称至少5位字符", diff --git a/src/manifest.json b/src/manifest.json index f1ee15b76..498eb67a0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "manifest_version": 2, - "version": "0.83.0", + "version": "0.83.2", "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", diff --git a/src/router/index.js b/src/router/index.js index 2c07efcdf..4bab69540 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -172,6 +172,13 @@ const routes = [ props: true, meta: { protect: true } }, + { + path: '/accounts/edit/:accountId?', + component: () => import('@/views/Accounts/Edit.vue'), + name: 'EditAccount', + props: true, + meta: { protect: true } + }, { path: '/accounts/hardware-wallet', component: () => import('@/views/Accounts/HardwareWallet/HardwareWallet.vue'), diff --git a/src/views/Accounts/ChainAccounts.vue b/src/views/Accounts/ChainAccounts.vue index 6f5bf74fc..28ea6251c 100644 --- a/src/views/Accounts/ChainAccounts.vue +++ b/src/views/Accounts/ChainAccounts.vue @@ -48,13 +48,23 @@ {{ formatFiatUI(formatFiat(account.totalFiatBalance)) }} @@ -65,6 +75,7 @@ import { mapState, mapGetters, mapActions } from 'vuex' import cryptoassets from '@liquality/wallet-core/dist/src/utils/cryptoassets' import PlusIcon from '@/assets/icons/plus_circle.svg' +import EditIcon from '@/assets/icons/edit_icon.svg' import { formatFiat, formatFiatUI } from '@liquality/wallet-core/dist/src/utils/coinFormatter' import { getAccountIcon } from '@/utils/accounts' import { getChainIcon } from '@/utils/accounts' @@ -73,7 +84,8 @@ import ListItem from '@/components/ListItem' export default { components: { PlusIcon, - ListItem + ListItem, + EditIcon }, props: { chain: Object @@ -171,15 +183,16 @@ export default { font-size: $font-size-tiny; color: $text-muted; } + } +} - .create-link { - width: 20px; - height: 20px; - margin-right: 20px; - svg { - width: 20px; - } - } +.create-link, +.edit-link { + width: 20px; + height: 20px; + margin-right: 20px; + svg { + width: 20px; } } diff --git a/src/views/Accounts/Edit.vue b/src/views/Accounts/Edit.vue new file mode 100644 index 000000000..3962858b3 --- /dev/null +++ b/src/views/Accounts/Edit.vue @@ -0,0 +1,237 @@ + + + + + diff --git a/src/views/Send/Send.vue b/src/views/Send/Send.vue index 8a377faab..a744529ed 100644 --- a/src/views/Send/Send.vue +++ b/src/views/Send/Send.vue @@ -9,7 +9,10 @@ {{ $t('common.send') }} - + {{ $t('components.noFundsForNetworkFee.noEnoughAsset', { asset: assetChain }) }} + + {{ $t('common.get') }} {{ assetChain }} + {{ `${$t('common.minSendAmount')} ${minimumAssetSendAmount} ${asset}` }} @@ -290,7 +293,6 @@ import { UNSResolver } from '@liquality/wallet-core/dist/src/nameResolvers/uns' import { errorToLiqualityErrorString } from '@liquality/error-parser/dist/src/utils' import { reportLiqualityError } from '@liquality/error-parser/dist/src/reporters/index' import InfoNotification from '@/components/InfoNotification' -import EthRequiredMessage from '@/components/EthRequiredMessage' export default { components: { @@ -303,8 +305,7 @@ export default { LedgerSignRequestModal, CustomFees, CustomFeesEIP1559, - InfoNotification, - EthRequiredMessage + InfoNotification }, mixins: [ledgerConnectMixin], data() { @@ -351,6 +352,9 @@ export default { ...mapState(['activeNetwork', 'activeWalletId', 'fees', 'fiatRates']), ...mapGetters('app', ['ledgerBridgeReady']), ...mapGetters(['accountItem', 'client', 'suggestedFeePrices']), + accountUrl() { + return `/accounts/${this.accountId}/${this.nativeAsset}/receive` + }, account() { return this.accountItem(this.accountId) }, @@ -470,12 +474,14 @@ export default { return true } - const nativeAssetBalance = this.networkWalletBalances[this.assetChain] - if ( - !nativeAssetBalance || - BN(nativeAssetBalance).lte(0) || - BN(nativeAssetBalance).minus(BN(this.currentFee)).lt(0) - ) { + const balance = this.networkWalletBalances[this.assetChain] + + if (!balance) { + return true + } + + const nativeAssetBalance = unitToCurrency(cryptoassets[this.assetChain], BN(balance)) + if (nativeAssetBalance.lte(0) || nativeAssetBalance.minus(BN(this.currentFee)).lte(0)) { return true } return false @@ -552,6 +558,7 @@ export default { getAssetIcon, getAssetColorStyle, shortenAddress, + getNativeAsset, updateSendAmount(newValue) { if (newValue && !isNaN(newValue)) { this.stateAmount = newValue diff --git a/src/views/Send/SendNFT.vue b/src/views/Send/SendNFT.vue index 3d86e525e..0939ee994 100644 --- a/src/views/Send/SendNFT.vue +++ b/src/views/Send/SendNFT.vue @@ -683,7 +683,7 @@ export default { ]).finally(() => { setTimeout(() => { this.updatingFees = false - }, 1000); + }, 1000) }) } } diff --git a/yarn.lock b/yarn.lock index b84d5442d..c123c43c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4013,9 +4013,9 @@ __metadata: languageName: node linkType: hard -"@liquality/wallet-core@npm:4.6.0": - version: 4.6.0 - resolution: "@liquality/wallet-core@npm:4.6.0" +"@liquality/wallet-core@npm:4.8.0": + version: 4.8.0 + resolution: "@liquality/wallet-core@npm:4.8.0" dependencies: "@blobfishkate/sovryncontracts": 1.3.27 "@chainify/bitcoin": 2.2.0 @@ -4065,7 +4065,7 @@ __metadata: urql: ^2.2.0 vue: ^2.6.11 vuex: ^3.1.3 - checksum: 46aac8f0b16ad7dc2061bebe93c386ebc08154ba978c57fb3fdbad89848a795650f3318fe2e88f540c28feca299c70e5dbdb69bbb09bbe582bafdadfc62d627b + checksum: 3a899bb4c588291962cf565128696f14710b9e711cb63036cd3d4251c010d42ac7e216f501a2a40132a16568855ea7e00ef8866a1925abe1f4c8b9c4615b120a languageName: node linkType: hard @@ -18762,7 +18762,7 @@ __metadata: "@liquality/ethereum-utils": ^1.13.12 "@liquality/terra-networks": ^1.13.12 "@liquality/types": ^1.13.12 - "@liquality/wallet-core": 4.6.0 + "@liquality/wallet-core": 4.8.0 "@terra-money/terra.js": ^3.1.6 "@testing-library/jest-dom": 5.16.5 "@testing-library/vue": ^5.8.2