From fa45c849bb95dab62b6bd3715109f745c29ff264 Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Fri, 26 Jun 2020 16:36:59 +0300 Subject: [PATCH 01/64] User invites referal --- src/popup/locales/en.json | 14 +- src/popup/router/components/SidebarMenu.vue | 5 + src/popup/router/pages/Invite.vue | 180 ++++++++++++++++++++ src/popup/router/routes.js | 10 ++ src/store/index.js | 4 + src/store/plugins/invites.js | 113 ++++++++++++ 6 files changed, 324 insertions(+), 2 deletions(-) create mode 100644 src/popup/router/pages/Invite.vue create mode 100644 src/store/plugins/invites.js diff --git a/src/popup/locales/en.json b/src/popup/locales/en.json index d3eb6d2a8..9b69380bc 100644 --- a/src/popup/locales/en.json +++ b/src/popup/locales/en.json @@ -228,7 +228,8 @@ "add-token": "Add token", "mint-burn-token": "Mint/Burn token", "allowances": "Allowances", - "sign-message": "Sign Message" + "sign-message": "Sign Message", + "invite": "Invite" }, "appVUE": { "systemName": "Superhero", @@ -264,7 +265,8 @@ "removeAccount": "Remove account", "donateErrorReports": "Submit error reports", "tokens": "Fungible tokens", - "manageTokens": "Manage tokens" + "manageTokens": "Manage tokens", + "invite": "Invite" }, "aboutSettings": { "heading": "About", @@ -941,6 +943,14 @@ "details": "Technical details:", "cancel": "Cancel", "donate": "Donate Data" + }, + "invite": { + "generate-link": "Generate invite link", + "generate": "Generate", + "created-links": "Created invite links", + "top-up": "Top up", + "close": "Close", + "claim": "Claim back" } }, "phishing": { diff --git a/src/popup/router/components/SidebarMenu.vue b/src/popup/router/components/SidebarMenu.vue index a3f6bfa6f..1f63699cf 100644 --- a/src/popup/router/components/SidebarMenu.vue +++ b/src/popup/router/components/SidebarMenu.vue @@ -68,6 +68,11 @@ {{ $t('pages.appVUE.names') }} +
  • + + {{ $t('pages.appVUE.invite') }} + +
  • {{ $t('pages.appVUE.help') }} diff --git a/src/popup/router/pages/Invite.vue b/src/popup/router/pages/Invite.vue new file mode 100644 index 000000000..5a0f73066 --- /dev/null +++ b/src/popup/router/pages/Invite.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/src/popup/router/routes.js b/src/popup/router/routes.js index dc3270cd6..ae951b8c5 100644 --- a/src/popup/router/routes.js +++ b/src/popup/router/routes.js @@ -41,6 +41,7 @@ import NamesDetails from './pages/Names/Details'; import AuctionList from './pages/Names/AuctionList'; import AuctionDetails from './pages/Names/AuctionDetails'; import AuctionBid from './pages/Names/AuctionBid'; +import Invite from './pages/Invite'; export default [ { @@ -394,4 +395,13 @@ export default [ notPersist: true, }, }, + { + name: 'invite', + path: '/invite', + component: Invite, + meta: { + title: 'invite', + notPersist: true, + }, + }, ]; diff --git a/src/store/index.js b/src/store/index.js index 7193dfc68..a65c4e14f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -11,6 +11,7 @@ import accounts from './plugins/account'; import tokens from './plugins/tokens'; import names from './plugins/names'; import runMigrations from './migrations'; +import invites from './plugins/invites'; import { networks, DEFAULT_NETWORK } from '../popup/utils/constants'; Vue.use(Vuex); @@ -108,6 +109,7 @@ export default new Vuex.Store({ saveErrorLog, tourStartBar, tokens: { all }, + invites: { referrals }, }) => ({ migrations, current, @@ -128,6 +130,7 @@ export default new Vuex.Store({ saveErrorLog, tourStartBar, tokens: { all }, + invites: { referrals }, }), ), modals, @@ -135,5 +138,6 @@ export default new Vuex.Store({ accounts, tokens, names, + invites, ], }); diff --git a/src/store/plugins/invites.js b/src/store/plugins/invites.js new file mode 100644 index 000000000..6270f1087 --- /dev/null +++ b/src/store/plugins/invites.js @@ -0,0 +1,113 @@ +import Vue from 'vue'; +import Ae from '@aeternity/aepp-sdk/es/ae/universal'; +import Node from '@aeternity/aepp-sdk/es/node'; +import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory'; +import { Crypto } from '@aeternity/aepp-sdk/es'; +import { calculateFee, TX_TYPES } from '../../popup/utils/constants'; +import { aeToAettos, aettosToAe } from '../../popup/utils/helper'; + +export default store => + store.registerModule('invites', { + namespaced: true, + state: { + referrals: [], + client: null, + }, + getters: { + get: state => link => state.referrals.find(r => r.link === link), + // eslint-disable-next-line no-unused-vars + keypair: state => referral => { + const segments = new URL(referral).pathname.split('/'); + const secret = segments[2]; + const { publicKey, secretKey } = Crypto.generateKeyPairFromSecret( + Crypto.decodeBase58Check(secret), + ); + + return { + publicKey: `ak_${Crypto.encodeBase58Check(Buffer.from(publicKey))}`, + secretKey: Buffer.from(secretKey).toString('hex'), + }; + }, + allReferrals({ referrals }, getters, { sdk }, { activeNetwork }) { + let { networkId } = activeNetwork; + if (sdk) networkId = sdk.getNetworkId(); + + return referrals.filter(r => r.networkId === networkId); + }, + }, + mutations: { + add(state, link) { + state.referrals.unshift(link); + }, + reset(state) { + state.referrals = []; + }, + setClient(state, client) { + state.client = client; + }, + setBalance(state, { i, balance }) { + Vue.set(state.referrals, i, { ...state.referrals[i], balance }); + }, + }, + actions: { + async claim({ rootState: { account }, dispatch, getters: { get, keypair } }, referral) { + const { publicKey, secretKey } = get(referral); + const sdkInstance = await dispatch( + 'getClient', + publicKey ? { publicKey, secretKey } : keypair(referral), + ); + const balance = await sdkInstance.balance(publicKey).catch(() => 0); + if (!balance) { + return false; + } + const fee = +aeToAettos( + calculateFee(TX_TYPES.txSign, { + ...sdkInstance.Ae.defaults, + }).min, + ); + const maxSpend = balance - fee; + if (maxSpend <= 0) { + return false; + } + try { + const res = await sdkInstance.spend(maxSpend, account.publicKey, { payload: 'referral' }); + return res; + } catch (e) { + dispatch('modals/open', { name: 'default', msg: e.message }, { root: true }); + return false; + } + }, + async getClient({ rootState: { network, current }, commit }, keypair) { + const { internalUrl, compilerUrl } = network[current.network]; + const node = await Node({ + url: internalUrl, + internalUrl, + }); + const accounts = MemoryAccount({ keypair }); + const sdkInstance = await Ae({ + compilerUrl, + nodes: [{ name: current.network, instance: node }], + accounts: [accounts], + }); + commit('setClient', sdkInstance); + + return sdkInstance; + }, + async getBalances({ state: { referrals, client }, dispatch, getters: { keypair }, commit }) { + await Promise.all( + referrals.map(async ({ link, publicKey, secretKey }, i) => { + const address = publicKey || keypair(link).publicKey; + const secret = secretKey || keypair(link).secretKey; + const sdk = + client || (await dispatch('getClient', { publicKey: address, secretKey: secret })); + + const balance = parseFloat( + +aettosToAe(await sdk.balance(address).catch(() => 0)), + ).toFixed(2); + commit('setBalance', { i, balance }); + return balance; + }), + ); + }, + }, + }); From 519835e37bbf0d51c24c586cff0e37693d0b7047 Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 08:59:37 +0300 Subject: [PATCH 02/64] Update src/store/plugins/invites.js Co-authored-by: Denis Davidyuk --- src/store/plugins/invites.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/plugins/invites.js b/src/store/plugins/invites.js index 6270f1087..f20def413 100644 --- a/src/store/plugins/invites.js +++ b/src/store/plugins/invites.js @@ -45,8 +45,8 @@ export default store => setClient(state, client) { state.client = client; }, - setBalance(state, { i, balance }) { - Vue.set(state.referrals, i, { ...state.referrals[i], balance }); + setBalance(state, { idx, balance }) { + Vue.set(state.referrals[idx], 'balance', balance); }, }, actions: { From 443f2c7b2f96e7d2fe9021e73e3b50f02c3726c4 Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 08:59:48 +0300 Subject: [PATCH 03/64] Update src/store/plugins/invites.js Co-authored-by: Denis Davidyuk --- src/store/plugins/invites.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/store/plugins/invites.js b/src/store/plugins/invites.js index f20def413..e4c05a86a 100644 --- a/src/store/plugins/invites.js +++ b/src/store/plugins/invites.js @@ -15,8 +15,7 @@ export default store => }, getters: { get: state => link => state.referrals.find(r => r.link === link), - // eslint-disable-next-line no-unused-vars - keypair: state => referral => { + keypair: () => referral => { const segments = new URL(referral).pathname.split('/'); const secret = segments[2]; const { publicKey, secretKey } = Crypto.generateKeyPairFromSecret( From 9d59ddd40c96a58a1cad497be8e26b43acf789e9 Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 09:00:08 +0300 Subject: [PATCH 04/64] Update src/popup/router/pages/Invite.vue Co-authored-by: Denis Davidyuk --- src/popup/router/pages/Invite.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/popup/router/pages/Invite.vue b/src/popup/router/pages/Invite.vue index 5a0f73066..494bd3e07 100644 --- a/src/popup/router/pages/Invite.vue +++ b/src/popup/router/pages/Invite.vue @@ -21,16 +21,15 @@ {{ referral.link }} - From 9e9af0d80ada558ffb2bdc768ae65ed544345a80 Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 09:07:18 +0300 Subject: [PATCH 05/64] Update src/popup/router/pages/Invite.vue Co-authored-by: Denis Davidyuk --- src/popup/router/pages/Invite.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/popup/router/pages/Invite.vue b/src/popup/router/pages/Invite.vue index 494bd3e07..1c29fcb0d 100644 --- a/src/popup/router/pages/Invite.vue +++ b/src/popup/router/pages/Invite.vue @@ -104,7 +104,7 @@ export default { }, async topUp({ link, topUpAmount, publicKey }) { this.loading = true; - const address = publicKey || this.$store.getters['invites/keypair'](link); + const address = publicKey || this.$store.getters['invites/keypair'](link). publicKey; try { await this.sdk.spend(+aeToAettos(topUpAmount), address, { payload: 'referral', From 9c9bb2d9448816ee2d3dc9832e871f16c2c0e9bf Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 09:07:30 +0300 Subject: [PATCH 06/64] Update src/store/plugins/invites.js Co-authored-by: Denis Davidyuk --- src/store/plugins/invites.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/store/plugins/invites.js b/src/store/plugins/invites.js index e4c05a86a..5e48dc827 100644 --- a/src/store/plugins/invites.js +++ b/src/store/plugins/invites.js @@ -38,9 +38,6 @@ export default store => add(state, link) { state.referrals.unshift(link); }, - reset(state) { - state.referrals = []; - }, setClient(state, client) { state.client = client; }, From 2d9e1a5f15ffc52547020aa82bf0c95801427719 Mon Sep 17 00:00:00 2001 From: Milen Radkov Date: Mon, 29 Jun 2020 11:45:26 +0300 Subject: [PATCH 07/64] remove universe store link --- src/popup/router/pages/Receive.vue | 6 +----- src/popup/utils/constants.js | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/popup/router/pages/Receive.vue b/src/popup/router/pages/Receive.vue index 04e984b0f..fde600f84 100644 --- a/src/popup/router/pages/Receive.vue +++ b/src/popup/router/pages/Receive.vue @@ -7,9 +7,6 @@ - @@ -25,7 +22,7 @@ import { mapGetters } from 'vuex'; import QrcodeVue from 'qrcode.vue'; import AccountInfo from '../components/AccountInfo'; import openUrl from '../../utils/openUrl'; -import { BUY_TOKENS_URL, CHANGE_CRYPTO_AE_URL } from '../../utils/constants'; +import { CHANGE_CRYPTO_AE_URL } from '../../utils/constants'; export default { name: 'Receive', @@ -34,7 +31,6 @@ export default { AccountInfo, }, data: () => ({ - buyTokensURL: BUY_TOKENS_URL, changeCryptoToAeUrl: CHANGE_CRYPTO_AE_URL, openUrl, }), diff --git a/src/popup/utils/constants.js b/src/popup/utils/constants.js index eccb4be7f..979af8dfa 100644 --- a/src/popup/utils/constants.js +++ b/src/popup/utils/constants.js @@ -182,6 +182,4 @@ export const IDENTICON_SIZES = { export const BUG_REPORT_URL = 'https://thesuperherowallet.typeform.com/to/vh8Ffu'; -export const BUY_TOKENS_URL = 'https://shop.aeternityuniverse.com'; - export const CHANGE_CRYPTO_AE_URL = 'https://app.jelly.market'; From 1350563f77d47766684d3fa8e5ae059ebcac007e Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 21:04:16 +0300 Subject: [PATCH 08/64] Create ReferralItem component --- src/popup/router/components/ReferralItem.vue | 123 +++++++++++++++++ src/popup/router/pages/Invite.vue | 133 +++---------------- src/store/index.js | 6 +- src/store/modules/invites.js | 61 +++++++++ src/store/plugins/invites.js | 109 --------------- 5 files changed, 205 insertions(+), 227 deletions(-) create mode 100644 src/popup/router/components/ReferralItem.vue create mode 100644 src/store/modules/invites.js delete mode 100644 src/store/plugins/invites.js diff --git a/src/popup/router/components/ReferralItem.vue b/src/popup/router/components/ReferralItem.vue new file mode 100644 index 000000000..3b82e59d5 --- /dev/null +++ b/src/popup/router/components/ReferralItem.vue @@ -0,0 +1,123 @@ + + + + + \ No newline at end of file diff --git a/src/popup/router/pages/Invite.vue b/src/popup/router/pages/Invite.vue index 1c29fcb0d..fa7ca3ee2 100644 --- a/src/popup/router/pages/Invite.vue +++ b/src/popup/router/pages/Invite.vue @@ -8,61 +8,32 @@

    {{ $t('pages.invite.created-links') }}

    -
    -
    - {{ referral.balance }} {{ $t('pages.appVUE.aeid') }} - - ({{ (referral.balance * current.currencyRate).toFixed(2) }} - - {{ current.currency.toUpperCase() }}) - {{ referral.date | formatDate }} -
    - - - -
    + diff --git a/src/store/index.js b/src/store/index.js index a65c4e14f..59463f3f5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -11,7 +11,7 @@ import accounts from './plugins/account'; import tokens from './plugins/tokens'; import names from './plugins/names'; import runMigrations from './migrations'; -import invites from './plugins/invites'; +import invites from './modules/invites'; import { networks, DEFAULT_NETWORK } from '../popup/utils/constants'; Vue.use(Vuex); @@ -138,6 +138,8 @@ export default new Vuex.Store({ accounts, tokens, names, - invites, ], + modules: { + invites, + }, }); diff --git a/src/store/modules/invites.js b/src/store/modules/invites.js new file mode 100644 index 000000000..c22b1b905 --- /dev/null +++ b/src/store/modules/invites.js @@ -0,0 +1,61 @@ +import Vue from 'vue'; +import { Crypto } from '@aeternity/aepp-sdk/es'; +import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory'; +import { aettosToAe } from '../../popup/utils/helper'; + +export default { + namespaced: true, + state: { + referrals: [], + }, + getters: { + get: state => link => state.referrals.find(r => r.link === link), + keypair: () => referral => { + const segments = new URL(referral).pathname.split('/'); + const secret = segments[2]; + const { publicKey, secretKey } = Crypto.generateKeyPairFromSecret( + Crypto.decodeBase58Check(secret), + ); + + return { + publicKey: `ak_${Crypto.encodeBase58Check(Buffer.from(publicKey))}`, + secretKey: Buffer.from(secretKey).toString('hex'), + }; + }, + }, + mutations: { + add(state, link) { + state.referrals.unshift(link); + }, + setBalance(state, { idx, balance }) { + Vue.set(state.referrals[idx], 'balance', balance); + }, + }, + actions: { + async claim({ rootState: { account, sdk }, state: { referrals }, dispatch }, idx) { + const { publicKey, secretKey } = referrals[idx]; + await sdk.addAccount(MemoryAccount({ keypair: { publicKey, secretKey } }), { select: true }); + try { + return sdk.transferFunds(1, account.publicKey, { + payload: 'referral', + }); + } catch (e) { + dispatch('modals/open', { name: 'default', msg: e.message }, { root: true }); + return false; + } finally { + sdk.selectAccount(account.publicKey); + } + }, + async getBalances({ rootState: { sdk }, state: { referrals }, commit }) { + await Promise.all( + referrals.map(async ({ publicKey }, idx) => { + const balance = parseFloat( + +aettosToAe(await sdk.balance(publicKey).catch(() => 0)), + ).toFixed(2); + commit('setBalance', { idx, balance }); + return balance; + }), + ); + }, + }, +}; diff --git a/src/store/plugins/invites.js b/src/store/plugins/invites.js deleted file mode 100644 index 5e48dc827..000000000 --- a/src/store/plugins/invites.js +++ /dev/null @@ -1,109 +0,0 @@ -import Vue from 'vue'; -import Ae from '@aeternity/aepp-sdk/es/ae/universal'; -import Node from '@aeternity/aepp-sdk/es/node'; -import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory'; -import { Crypto } from '@aeternity/aepp-sdk/es'; -import { calculateFee, TX_TYPES } from '../../popup/utils/constants'; -import { aeToAettos, aettosToAe } from '../../popup/utils/helper'; - -export default store => - store.registerModule('invites', { - namespaced: true, - state: { - referrals: [], - client: null, - }, - getters: { - get: state => link => state.referrals.find(r => r.link === link), - keypair: () => referral => { - const segments = new URL(referral).pathname.split('/'); - const secret = segments[2]; - const { publicKey, secretKey } = Crypto.generateKeyPairFromSecret( - Crypto.decodeBase58Check(secret), - ); - - return { - publicKey: `ak_${Crypto.encodeBase58Check(Buffer.from(publicKey))}`, - secretKey: Buffer.from(secretKey).toString('hex'), - }; - }, - allReferrals({ referrals }, getters, { sdk }, { activeNetwork }) { - let { networkId } = activeNetwork; - if (sdk) networkId = sdk.getNetworkId(); - - return referrals.filter(r => r.networkId === networkId); - }, - }, - mutations: { - add(state, link) { - state.referrals.unshift(link); - }, - setClient(state, client) { - state.client = client; - }, - setBalance(state, { idx, balance }) { - Vue.set(state.referrals[idx], 'balance', balance); - }, - }, - actions: { - async claim({ rootState: { account }, dispatch, getters: { get, keypair } }, referral) { - const { publicKey, secretKey } = get(referral); - const sdkInstance = await dispatch( - 'getClient', - publicKey ? { publicKey, secretKey } : keypair(referral), - ); - const balance = await sdkInstance.balance(publicKey).catch(() => 0); - if (!balance) { - return false; - } - const fee = +aeToAettos( - calculateFee(TX_TYPES.txSign, { - ...sdkInstance.Ae.defaults, - }).min, - ); - const maxSpend = balance - fee; - if (maxSpend <= 0) { - return false; - } - try { - const res = await sdkInstance.spend(maxSpend, account.publicKey, { payload: 'referral' }); - return res; - } catch (e) { - dispatch('modals/open', { name: 'default', msg: e.message }, { root: true }); - return false; - } - }, - async getClient({ rootState: { network, current }, commit }, keypair) { - const { internalUrl, compilerUrl } = network[current.network]; - const node = await Node({ - url: internalUrl, - internalUrl, - }); - const accounts = MemoryAccount({ keypair }); - const sdkInstance = await Ae({ - compilerUrl, - nodes: [{ name: current.network, instance: node }], - accounts: [accounts], - }); - commit('setClient', sdkInstance); - - return sdkInstance; - }, - async getBalances({ state: { referrals, client }, dispatch, getters: { keypair }, commit }) { - await Promise.all( - referrals.map(async ({ link, publicKey, secretKey }, i) => { - const address = publicKey || keypair(link).publicKey; - const secret = secretKey || keypair(link).secretKey; - const sdk = - client || (await dispatch('getClient', { publicKey: address, secretKey: secret })); - - const balance = parseFloat( - +aettosToAe(await sdk.balance(address).catch(() => 0)), - ).toFixed(2); - commit('setBalance', { i, balance }); - return balance; - }), - ); - }, - }, - }); From 1b29a725fe77c7c30bc505c11e915016b680b2fe Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 21:20:00 +0300 Subject: [PATCH 09/64] Add amount formtter to get balance method --- src/store/modules/invites.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/modules/invites.js b/src/store/modules/invites.js index c22b1b905..15ecc6163 100644 --- a/src/store/modules/invites.js +++ b/src/store/modules/invites.js @@ -2,6 +2,7 @@ import Vue from 'vue'; import { Crypto } from '@aeternity/aepp-sdk/es'; import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory'; import { aettosToAe } from '../../popup/utils/helper'; +import { AE_AMOUNT_FORMATS } from '@aeternity/aepp-sdk/es/utils/amount-formatter'; export default { namespaced: true, @@ -50,7 +51,7 @@ export default { await Promise.all( referrals.map(async ({ publicKey }, idx) => { const balance = parseFloat( - +aettosToAe(await sdk.balance(publicKey).catch(() => 0)), + await sdk.balance(publicKey, { format: AE_AMOUNT_FORMATS.AE }).catch(() => 0), ).toFixed(2); commit('setBalance', { idx, balance }); return balance; From 88379b812af06e988456b09e2a4799c08c01e39e Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Mon, 29 Jun 2020 21:23:07 +0300 Subject: [PATCH 10/64] Remove unused import --- src/store/modules/invites.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/store/modules/invites.js b/src/store/modules/invites.js index 15ecc6163..d29a67b78 100644 --- a/src/store/modules/invites.js +++ b/src/store/modules/invites.js @@ -1,7 +1,6 @@ import Vue from 'vue'; import { Crypto } from '@aeternity/aepp-sdk/es'; import MemoryAccount from '@aeternity/aepp-sdk/es/account/memory'; -import { aettosToAe } from '../../popup/utils/helper'; import { AE_AMOUNT_FORMATS } from '@aeternity/aepp-sdk/es/utils/amount-formatter'; export default { From 25c386cb05e1cbf3875b979573f746dfc9b5b563 Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Tue, 30 Jun 2020 09:06:48 +0300 Subject: [PATCH 11/64] Update src/store/modules/invites.js Co-authored-by: Denis Davidyuk --- src/store/modules/invites.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/store/modules/invites.js b/src/store/modules/invites.js index d29a67b78..fef4f8417 100644 --- a/src/store/modules/invites.js +++ b/src/store/modules/invites.js @@ -9,7 +9,6 @@ export default { referrals: [], }, getters: { - get: state => link => state.referrals.find(r => r.link === link), keypair: () => referral => { const segments = new URL(referral).pathname.split('/'); const secret = segments[2]; From 12fcf192d9b5e2083bce1f1bc7f9df9d6eba088a Mon Sep 17 00:00:00 2001 From: Petar Baykov Date: Tue, 30 Jun 2020 09:07:06 +0300 Subject: [PATCH 12/64] Update src/store/modules/invites.js Co-authored-by: Denis Davidyuk --- src/store/modules/invites.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/store/modules/invites.js b/src/store/modules/invites.js index fef4f8417..f018d280e 100644 --- a/src/store/modules/invites.js +++ b/src/store/modules/invites.js @@ -52,7 +52,6 @@ export default { await sdk.balance(publicKey, { format: AE_AMOUNT_FORMATS.AE }).catch(() => 0), ).toFixed(2); commit('setBalance', { idx, balance }); - return balance; }), ); }, From 6cc331bae1601db1dc8c5a00121c634b2faacce3 Mon Sep 17 00:00:00 2001 From: Dmitry Kostin Date: Thu, 2 Jul 2020 16:36:21 +1000 Subject: [PATCH 13/64] Leave backup notification visible until user backs up their seed --- src/popup/router/pages/Account.vue | 14 +------------- src/popup/router/pages/SecuritySettings.vue | 6 +++++- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/popup/router/pages/Account.vue b/src/popup/router/pages/Account.vue index 48e96e048..13d59c862 100644 --- a/src/popup/router/pages/Account.vue +++ b/src/popup/router/pages/Account.vue @@ -1,7 +1,7 @@