From d9d6ba9478948d288ac3b2b61ef571f04d4a40e2 Mon Sep 17 00:00:00 2001 From: Bradley Suira Date: Mon, 9 Jan 2023 08:53:22 -0500 Subject: [PATCH 1/2] fix: fixed activity screen filters for current asset transactions --- package.json | 4 +-- src/main.js | 1 + src/manifest.json | 2 +- src/router/index.js | 71 +++++++++++++++++-------------------- src/views/Account.vue | 14 ++++++-- src/views/Swap/Accounts.vue | 6 +++- src/views/UnlockWallet.vue | 2 +- yarn.lock | 24 ++++++------- 8 files changed, 66 insertions(+), 58 deletions(-) diff --git a/package.json b/package.json index c68ecd4c1..56194f1e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "liquality-wallet", - "version": "0.82.10", + "version": "0.82.11", "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.3.0", + "@liquality/wallet-core": "4.4.0", "@terra-money/terra.js": "^3.1.6", "@testing-library/vue": "^5.8.2", "amplitude-js": "8.18.2", diff --git a/src/main.js b/src/main.js index fdd3556d7..dd928a1ea 100644 --- a/src/main.js +++ b/src/main.js @@ -14,6 +14,7 @@ Vue.config.productionTip = false Vue.use(Localization) new Vue({ + name: 'Liquality Wallet', router, store, render: (h) => h(App) diff --git a/src/manifest.json b/src/manifest.json index 188287d74..e0c59a0bd 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,6 +1,6 @@ { "manifest_version": 2, - "version": "0.82.10", + "version": "0.82.11", "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", diff --git a/src/router/index.js b/src/router/index.js index 13943be17..2c07efcdf 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -8,10 +8,8 @@ import OpenWallet from '@/views/Open.vue' import WalletAssets from '@/views/Wallet/WalletAssets.vue' import Wallet from '@/views/Wallet/Wallet.vue' -const Warning = () => - import(/* webpackPrefetch: true */ '@/views/Onboarding/SeedPhrase/Warning.vue') -const LoginPhrase = () => - import(/* webpackPrefetch: true */ '@/views/Onboarding/SeedPhrase/LoginPhrase.vue') +const Warning = () => import('@/views/Onboarding/SeedPhrase/Warning.vue') +const LoginPhrase = () => import('@/views/Onboarding/SeedPhrase/LoginPhrase.vue') Vue.use(VueRouter) @@ -25,7 +23,7 @@ const routes = [ }, { path: '/onboarding/import', - component: () => import(/* webpackPrefetch: true */ '@/views/Onboarding/ImportWallet.vue'), + component: () => import('@/views/Onboarding/ImportWallet.vue'), meta: { protect: false } }, { @@ -36,14 +34,14 @@ const routes = [ }, { path: '/onboarding/setup/:seedphrase?', - component: () => import(/* webpackPrefetch: true */ '@/views/Onboarding/OnboardingSetup.vue'), + component: () => import('@/views/Onboarding/OnboardingSetup.vue'), name: 'OnboardingSetup', props: true, meta: { protect: false } }, { path: '/onboarding/home', - component: () => import(/* webpackPrefetch: true */ '@/views/Onboarding/OnboardingHome.vue'), + component: () => import('@/views/Onboarding/OnboardingHome.vue'), name: 'OnboardingHome', meta: { protect: false } }, @@ -52,7 +50,7 @@ const routes = [ // Settings { path: '/settings', - component: () => import(/* webpackPrefetch: true */ '@/views/Settings'), + component: () => import('@/views/Settings'), meta: { protect: true }, children: [ { @@ -69,7 +67,7 @@ const routes = [ }, { path: '/settings/experiments', - component: () => import(/* webpackPrefetch: true */ '@/views/Experiments'), + component: () => import('@/views/Experiments'), name: 'Experiments', meta: { protect: true } }, @@ -81,7 +79,7 @@ const routes = [ }, { path: '/settings/manage-assets/custom-token', - component: () => import(/* webpackPrefetch: true */ '@/views/CustomToken'), + component: () => import('@/views/CustomToken'), name: 'CustomToken', meta: { protect: true } }, @@ -100,12 +98,12 @@ const routes = [ }, { path: 'activity', - component: () => import(/* webpackPrefetch: true */ '@/views/Wallet/WalletActivity.vue'), + component: () => import('@/views/Wallet/WalletActivity.vue'), name: 'WalletActivity' }, { path: 'nfts', - component: () => import(/* webpackPrefetch: true */ '@/views/Wallet/WalletNFTs.vue'), + component: () => import('@/views/Wallet/WalletNFTs.vue'), name: 'WalletNFTs' }, { @@ -116,46 +114,45 @@ const routes = [ }, { path: '/wallet/nfts/activity/:id', - component: () => import(/* webpackPrefetch: true */ '@/views/Wallet/NFTActivity.vue'), + component: () => import('@/views/Wallet/NFTActivity.vue'), name: 'NFTActivity', props: true }, { path: '/wallet/nfts/send', - component: () => import(/* webpackPrefetch: true */ '@/views/Send/SendNFT.vue'), + component: () => import('@/views/Send/SendNFT.vue'), name: 'SendNFT' }, { path: '/details/nft-transaction/:id', - component: () => - import(/* webpackPrefetch: true */ '@/views/Details/NFTTransactionDetails.vue'), + component: () => import('@/views/Details/NFTTransactionDetails.vue'), name: 'NFTTransactionDetails', props: true }, // Details { path: '/details/swap/:id', - component: () => import(/* webpackPrefetch: true */ '@/views/Details/SwapDetails.vue'), + component: () => import('@/views/Details/SwapDetails.vue'), name: 'SwapDetails', props: true, meta: { protect: true } }, { path: '/details/transaction/:id', - component: () => import(/* webpackPrefetch: true */ '@/views/Details/TransactionDetails.vue'), + component: () => import('@/views/Details/TransactionDetails.vue'), name: 'TransactionDetails', props: true, meta: { protect: true } }, { path: '/details/nft-collection/:id', - component: () => import(/* webpackPrefetch: true */ '@/views/Details/NFTCollectionList.vue'), + component: () => import('@/views/Details/NFTCollectionList.vue'), name: 'NFTCollectionList', props: true }, { path: '/details/nft-asset/:id', - component: () => import(/* webpackPrefetch: true */ '@/views/Details/NFTAssetDetails.vue'), + component: () => import('@/views/Details/NFTAssetDetails.vue'), name: 'NFTAssetDetails', props: true }, @@ -163,22 +160,21 @@ const routes = [ // Accounts { path: '/accounts/management', - component: () => import(/* webpackPrefetch: true */ '@/views/Accounts/Manage.vue'), + component: () => import('@/views/Accounts/Manage.vue'), name: 'ManageAccounts', props: true, meta: { protect: true } }, { path: '/accounts/create/:chainId?', - component: () => import(/* webpackPrefetch: true */ '@/views/Accounts/Create.vue'), + component: () => import('@/views/Accounts/Create.vue'), name: 'CreateAccount', props: true, meta: { protect: true } }, { path: '/accounts/hardware-wallet', - component: () => - import(/* webpackPrefetch: true */ '@/views/Accounts/HardwareWallet/HardwareWallet.vue'), + component: () => import('@/views/Accounts/HardwareWallet/HardwareWallet.vue'), props: true, name: 'HardwareWallet', meta: { protect: true } @@ -186,28 +182,28 @@ const routes = [ { name: 'Account', path: '/accounts/:accountId/:asset', - component: () => import(/* webpackPrefetch: true */ '@/views/Account.vue'), + component: () => import('@/views/Account.vue'), props: true, meta: { protect: true } }, { name: 'Send', path: '/accounts/:accountId/:asset/send', - component: () => import(/* webpackPrefetch: true */ '@/views/Send/Send.vue'), + component: () => import('@/views/Send/Send.vue'), props: true, meta: { protect: true } }, { name: 'Receive', path: '/accounts/:accountId/:asset/receive', - component: () => import(/* webpackPrefetch: true */ '@/views/Receive.vue'), + component: () => import('@/views/Receive.vue'), props: true, meta: { protect: true } }, { name: 'Swap', path: '/accounts/:accountId/:routeAsset/swap', - component: () => import(/* webpackPrefetch: true */ '@/views/Swap/Swap.vue'), + component: () => import('@/views/Swap/Swap.vue'), props: true, meta: { protect: true } }, @@ -215,7 +211,7 @@ const routes = [ // Assets list { path: '/assets/:action', - component: () => import(/* webpackPrefetch: true */ '@/views/AssetList.vue'), + component: () => import('@/views/AssetList.vue'), props: true, meta: { protect: true } }, @@ -223,37 +219,37 @@ const routes = [ // Injection { path: '/request-unlock', - component: () => import(/* webpackPrefetch: true */ '@/views/RequestUnlockWallet.vue'), + component: () => import('@/views/RequestUnlockWallet.vue'), meta: { protect: false } }, { path: '/enable', - component: () => import(/* webpackPrefetch: true */ '@/views/Enable.vue'), + component: () => import('@/views/Enable.vue'), meta: { protect: false } }, { path: '/permission/send', - component: () => import(/* webpackPrefetch: true */ '@/views/PermissionSend.vue'), + component: () => import('@/views/PermissionSend.vue'), meta: { protect: false } }, { path: '/permission/terra', - component: () => import(/* webpackPrefetch: true */ '@/views/PermissionTerra.vue'), + component: () => import('@/views/PermissionTerra.vue'), meta: { protect: false } }, { path: '/permission/sign', - component: () => import(/* webpackPrefetch: true */ '@/views/PermissionSign.vue'), + component: () => import('@/views/PermissionSign.vue'), meta: { protect: false } }, { path: '/permission/signPsbt', - component: () => import(/* webpackPrefetch: true */ '@/views/PermissionSignPsbt.vue'), + component: () => import('@/views/PermissionSignPsbt.vue'), meta: { protect: false } }, { path: '/permission/default', - component: () => import(/* webpackPrefetch: true */ '@/views/Permission.vue'), + component: () => import('@/views/Permission.vue'), meta: { protect: false } }, // Injection @@ -271,8 +267,7 @@ const routes = [ }, { path: '/seedreveal', - component: () => - import(/* webpackPrefetch: true */ '@/views/Onboarding/SeedPhrase/PhraseReveal'), + component: () => import('@/views/Onboarding/SeedPhrase/PhraseReveal'), meta: { protect: true } }, diff --git a/src/views/Account.vue b/src/views/Account.vue index a5b247011..d7b07f71a 100644 --- a/src/views/Account.vue +++ b/src/views/Account.vue @@ -188,7 +188,11 @@ export default { return this.marketData[this.activeNetwork][this.asset] }, assetHistory() { - return this.activity.filter((item) => this.isNotNftTransaction(item)) + return this.activity.filter((item) => { + return ( + (item.from === this.asset || item.to === this.asset) && this.isNotNftTransaction(item) + ) + }) }, addressLink() { if (this.account) { @@ -200,7 +204,10 @@ export default { return cryptoassets[this.asset]?.chain }, filteredTransactions() { - return this.activityData.filter((t) => t.accountId === this.accountId) + debugger + return this.activityData.filter( + (t) => t.fromAccountId === this.accountId || t.toAccountId === this.accountId + ) } }, methods: { @@ -212,7 +219,7 @@ export default { formatFiat, formatFiatUI, isNotNftTransaction(item) { - return item.from === this.asset && item.type !== 'NFT' + return item.type !== 'NFT' }, async copyAddress() { await navigator.clipboard.writeText(this.address) @@ -248,6 +255,7 @@ export default { this.address = getChain(this.activeNetwork, chainId).formatAddressUI(addresses[0]) await this.refresh() + debugger this.activityData = [...this.assetHistory] }, watch: { diff --git a/src/views/Swap/Accounts.vue b/src/views/Swap/Accounts.vue index f947c5f44..838bec551 100644 --- a/src/views/Swap/Accounts.vue +++ b/src/views/Swap/Accounts.vue @@ -40,7 +40,11 @@ export default { accounts() { return (this.assetSelection === 'from' ? this.accountsWithBalance : this.accountsData) .filter((acc) => { - if (isEvmChain(this.activeNetwork, this.account.chain) && this.assetSelection === 'to') { + if ( + isEvmChain(this.activeNetwork, this.account.chain) && // from + isEvmChain(this.activeNetwork, acc.chain) && // to + this.assetSelection === 'to' + ) { return this.account.addresses[0] === acc.addresses[0] } return true diff --git a/src/views/UnlockWallet.vue b/src/views/UnlockWallet.vue index 8e301a392..97f5e6b7b 100644 --- a/src/views/UnlockWallet.vue +++ b/src/views/UnlockWallet.vue @@ -88,8 +88,8 @@ export default { } }) } catch (e) { - reportLiqualityError(e) this.error = this.$tle(errorToLiqualityErrorString(e)) + reportLiqualityError(e) this.trackAnalytics({ event: 'UnlockWallet failed', properties: { diff --git a/yarn.lock b/yarn.lock index bce090128..fd435ef49 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4013,9 +4013,9 @@ __metadata: languageName: node linkType: hard -"@liquality/wallet-core@npm:4.3.0": - version: 4.3.0 - resolution: "@liquality/wallet-core@npm:4.3.0" +"@liquality/wallet-core@npm:4.4.0": + version: 4.4.0 + resolution: "@liquality/wallet-core@npm:4.4.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: 334471b61cce07e38149968e3220f7141fbbdd8e30f67556f524adb0f8b310675474cd9febec3ad50212f00eae44b324779521dc499e66dcc138f9007d80867a + checksum: 6c8f66fad4342dc8c243fcb08a235b6e11ee5f24946aa1abacb75919f27b4ad4bbdad05e07fff184a0661cde099c34ce30c5d161fb88455de8a131a0183f58d7 languageName: node linkType: hard @@ -4147,9 +4147,9 @@ __metadata: linkType: hard "@noble/secp256k1@npm:^1.6.3": - version: 1.7.0 - resolution: "@noble/secp256k1@npm:1.7.0" - checksum: 540a2b8e527ee1e5522af1c430e54945ad373883cac983b115136cd0950efa1f2c473ee6a36d8e69b6809b3ee586276de62f5fa705c77a9425721e81bada8116 + version: 1.7.1 + resolution: "@noble/secp256k1@npm:1.7.1" + checksum: d2301f1f7690368d8409a3152450458f27e54df47e3f917292de3de82c298770890c2de7c967d237eff9c95b70af485389a9695f73eb05a43e2bd562d18b18cb 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.3.0 + "@liquality/wallet-core": 4.4.0 "@terra-money/terra.js": ^3.1.6 "@testing-library/jest-dom": 5.16.5 "@testing-library/vue": ^5.8.2 @@ -28427,17 +28427,17 @@ __metadata: linkType: hard "ws@npm:^8.3.0, ws@npm:^8.5.0": - version: 8.11.0 - resolution: "ws@npm:8.11.0" + version: 8.12.0 + resolution: "ws@npm:8.12.0" peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 + utf-8-validate: ">=5.0.2" peerDependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - checksum: 316b33aba32f317cd217df66dbfc5b281a2f09ff36815de222bc859e3424d83766d9eb2bd4d667de658b6ab7be151f258318fb1da812416b30be13103e5b5c67 + checksum: 818ff3f8749c172a95a114cceb8b89cedd27e43a82d65c7ad0f7882b1e96a2ee6709e3746a903c3fa88beec0c8bae9a9fcd75f20858b32a166dfb7519316a5d7 languageName: node linkType: hard From 3f8df533f4d9453e1fd8999e38a076517b020245 Mon Sep 17 00:00:00 2001 From: Bradley Suira Date: Mon, 9 Jan 2023 08:58:17 -0500 Subject: [PATCH 2/2] fix: removed debuggers and enable console reported --- .env | 2 +- src/views/Account.vue | 2 -- src/views/PermissionSend.vue | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.env b/.env index 70631b054..79fc8a93d 100644 --- a/.env +++ b/.env @@ -21,7 +21,7 @@ VUE_APP_FIREBASE_APP_ID= VUE_APP_FIREBASE_MEASUREMENT_ID= VUE_APP_FIREBASE_DATABASE_URL= VUE_APP_MAX_ERROR_LOG_SIZE=100 -VUE_APP_REPORT_TARGETS=Sentry +VUE_APP_REPORT_TARGETS=Sentry,Console VUE_APP_NPM_PACKAGE_VERSION=0_81_0 VUE_APP_SENTRY_DSN=https://2c52b9d6e67741cf9d4eabe32369827a@o241807.ingest.sentry.io/5444900 diff --git a/src/views/Account.vue b/src/views/Account.vue index d7b07f71a..a7f9c4f32 100644 --- a/src/views/Account.vue +++ b/src/views/Account.vue @@ -204,7 +204,6 @@ export default { return cryptoassets[this.asset]?.chain }, filteredTransactions() { - debugger return this.activityData.filter( (t) => t.fromAccountId === this.accountId || t.toAccountId === this.accountId ) @@ -255,7 +254,6 @@ export default { this.address = getChain(this.activeNetwork, chainId).formatAddressUI(addresses[0]) await this.refresh() - debugger this.activityData = [...this.assetHistory] }, watch: { diff --git a/src/views/PermissionSend.vue b/src/views/PermissionSend.vue index 278e1afab..0b3ac6e38 100644 --- a/src/views/PermissionSend.vue +++ b/src/views/PermissionSend.vue @@ -324,7 +324,6 @@ export default { } else { this.updateMaxSendFees() this.updateSendFees(this.amount) - debugger this.customFee = this.calculateFee(fee) this.selectedFee = 'custom' }