From de7498d74a8ba44996f3e8086be8f885a6538b0e Mon Sep 17 00:00:00 2001 From: Mpwanyi Samuel Date: Fri, 13 Jan 2023 16:27:21 +0300 Subject: [PATCH 1/5] If user does not have enough native coin for gas fee message at top should appear --- src/views/Send/Send.vue | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/views/Send/Send.vue b/src/views/Send/Send.vue index 8a377faab..3ac2e1ee0 100644 --- a/src/views/Send/Send.vue +++ b/src/views/Send/Send.vue @@ -14,6 +14,12 @@ {{ `${$t('common.minSendAmount')} ${minimumAssetSendAmount} ${asset}` }} + + {{ $t('components.noFundsForNetworkFee.noEnoughAsset', { asset: nativeAsset }) }} + + {{ $t('common.get') }} {{ nativeAsset }} + +
Date: Fri, 13 Jan 2023 16:28:30 +0300 Subject: [PATCH 2/5] lint fix --- src/views/Send/Send.vue | 8 ++++---- src/views/Send/SendNFT.vue | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/Send/Send.vue b/src/views/Send/Send.vue index 3ac2e1ee0..846a6c9c4 100644 --- a/src/views/Send/Send.vue +++ b/src/views/Send/Send.vue @@ -369,10 +369,10 @@ export default { nativeAssetBalance() { const balance = this.account.balances?.[this.nativeAsset] || 0 const pBalance = prettyBalance(balance, this.nativeAsset) - return new BN(pBalance); + return new BN(pBalance) }, hasEnoughGasFee() { - return this.nativeAssetBalance.gte(this.prettyFee); + return this.nativeAssetBalance.gte(this.prettyFee) }, networkWalletBalances() { return this.account?.balances @@ -507,8 +507,8 @@ export default { !this.addressError && BN(this.amount).gte(BN(this.minimumAssetSendAmount)) && BN(this.amount).gt(0) && - !this.amountError - && this.hasEnoughGasFee + !this.amountError && + this.hasEnoughGasFee ) { return true } 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) }) } } From 6b126711cf71254d8bf562f0690b18ba2b2249bd Mon Sep 17 00:00:00 2001 From: Mpwanyi Samuel Date: Fri, 13 Jan 2023 16:56:52 +0300 Subject: [PATCH 3/5] Clean up --- src/views/Send/Send.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/Send/Send.vue b/src/views/Send/Send.vue index 846a6c9c4..e26decf4c 100644 --- a/src/views/Send/Send.vue +++ b/src/views/Send/Send.vue @@ -368,8 +368,7 @@ export default { }, nativeAssetBalance() { const balance = this.account.balances?.[this.nativeAsset] || 0 - const pBalance = prettyBalance(balance, this.nativeAsset) - return new BN(pBalance) + return new BN(balance) }, hasEnoughGasFee() { return this.nativeAssetBalance.gte(this.prettyFee) From 0b035fe97cc3c0ab322a83def6fae1141a47eaac Mon Sep 17 00:00:00 2001 From: Bradley Suira Date: Fri, 13 Jan 2023 09:50:45 -0500 Subject: [PATCH 4/5] fix: fixed native asset required for send --- package.json | 2 +- src/manifest.json | 2 +- src/views/Send/Send.vue | 42 ++++++++++++++--------------------------- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 76b9512f1..e5ea357f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquality-wallet", - "version": "0.83.0", + "version": "0.83.1", "private": true, "author": "Liquality ", "scripts": { diff --git a/src/manifest.json b/src/manifest.json index f1ee15b76..50050d886 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "manifest_version": 2, - "version": "0.83.0", + "version": "0.83.1", "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", diff --git a/src/views/Send/Send.vue b/src/views/Send/Send.vue index e26decf4c..a744529ed 100644 --- a/src/views/Send/Send.vue +++ b/src/views/Send/Send.vue @@ -9,17 +9,14 @@ {{ $t('common.send') }} - + {{ $t('components.noFundsForNetworkFee.noEnoughAsset', { asset: assetChain }) }} + + {{ $t('common.get') }} {{ assetChain }} + {{ `${$t('common.minSendAmount')} ${minimumAssetSendAmount} ${asset}` }} - - {{ $t('components.noFundsForNetworkFee.noEnoughAsset', { asset: nativeAsset }) }} - - {{ $t('common.get') }} {{ nativeAsset }} - -
Date: Fri, 13 Jan 2023 14:14:07 -0500 Subject: [PATCH 5/5] feat: implement account edit screen --- package.json | 4 +- src/assets/icons/edit_icon.svg | 21 +++ src/locales/cb/pages.json | 1 + src/locales/en/pages.json | 1 + src/locales/es/pages.json | 1 + src/locales/ph/pages.json | 1 + src/locales/pt/pages.json | 1 + src/locales/zh/pages.json | 1 + src/manifest.json | 2 +- src/router/index.js | 7 + src/views/Accounts/ChainAccounts.vue | 45 +++-- src/views/Accounts/Edit.vue | 237 +++++++++++++++++++++++++++ yarn.lock | 10 +- 13 files changed, 308 insertions(+), 24 deletions(-) create mode 100644 src/assets/icons/edit_icon.svg create mode 100644 src/views/Accounts/Edit.vue diff --git a/package.json b/package.json index e5ea357f8..3a3d584e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquality-wallet", - "version": "0.83.1", + "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 50050d886..498eb67a0 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "manifest_version": 2, - "version": "0.83.1", + "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/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