diff --git a/README.md b/README.md index dbe861a0c..22b1f3f19 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ **SuperHero is a browser extension that allows you to send and recieve value to URLs and content accross Internet.** -[![Build Status](https://travis-ci.com/aeternity/superhero-wallet.svg?branch=master)](https://travis-ci.com/aeternity/superhero-wallet) +[![Build Status](https://travis-ci.com/aeternity/superhero-wallet.svg?branch=develop)](https://travis-ci.com/aeternity/superhero-wallet) + ## Build Clone the master branch of this repo. diff --git a/config.xml b/config.xml index 82e8566e8..df6b4c077 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + SuperHero SuperHero wallet diff --git a/package-lock.json b/package-lock.json index 4782cd214..fe6645591 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "superhero-wallet", - "version": "0.0.18", + "version": "0.0.19", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 339a673c8..b8d109d0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superhero-wallet", - "version": "0.0.18", + "version": "0.0.19", "description": "Superhero wallet", "author": "SuperHero", "license": "MIT", diff --git a/src/mixins/removeAccount.js b/src/mixins/removeAccount.js new file mode 100644 index 000000000..481ae0ee0 --- /dev/null +++ b/src/mixins/removeAccount.js @@ -0,0 +1,23 @@ +import { AEX2_METHODS } from '../popup/utils/constants'; +import { postMessage } from '../popup/utils/connection'; + +export default { + methods: { + async removeAccount() { + const remove = await this.$store + .dispatch('modals/open', { + name: 'confirm', + title: this.$t('modals.removeAccount.title'), + msg: this.$t('modals.removeAccount.msg'), + }) + .catch(() => false); + if (remove) { + this.$emit('closeMenu'); + await this.$store.dispatch('reset'); + await this.$router.push('/'); + this.$store.commit('SET_MAIN_LOADING', false); + if (process.env.IS_EXTENSION) postMessage({ type: AEX2_METHODS.LOGOUT }); + } + }, + }, +}; diff --git a/src/popup/App.vue b/src/popup/App.vue index 3b051e3a0..1c8650dc1 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -115,15 +115,11 @@ export default { this.pollData(); }, pollData() { - let triggerOnce = false; const polling = setInterval(async () => { if (!this.isLoggedIn) return; - if (!process.env.RUNNING_IN_TESTS) this.$store.dispatch('updateBalance'); - if (!triggerOnce) { - this.$store.dispatch('getRegisteredNames'); - triggerOnce = true; - } + if (!process.env.RUNNING_IN_TESTS && this.sdk) this.$store.dispatch('updateBalance'); }, 2500); + this.$store.dispatch('getRegisteredNames'); this.$once('hook:beforeDestroy', () => clearInterval(polling)); }, }, diff --git a/src/popup/locales/en.json b/src/popup/locales/en.json index 6cfd9cb5a..7917b4256 100644 --- a/src/popup/locales/en.json +++ b/src/popup/locales/en.json @@ -65,7 +65,13 @@ }, "insufficient-balance": { "msg": "The requested amount cannot be spent." - } + }, + "removeAccount": { + "title": "Are you sure you want to remove this account?", + "msg": "This action will remove your account from the wallet and will delete the extension storage. Make sure you have backed up your seed phrase before proceeding. This action cannot be undone!" + }, + "cancel": "Cancel", + "confirm": "Confirm" }, "pages": { "intro": { @@ -137,7 +143,8 @@ "mainAccount": "Main account", "reportBug": "Report a bug", "names": "Names", - "networks": "Networks" + "networks": "Networks", + "removeAccount": "Remove account" }, "aboutSettings": { "heading": "About", @@ -176,7 +183,9 @@ "tipsOnUrl": "Tips on this URL", "urlNotExisting": "Tip for this url does not exist", "moreOracles": "There are not enough active oracles to verify your claim request, please try again later.", - "oracleFailed": "Oracle service check claim failed, please try again later." + "oracleFailed": "Oracle service check claim failed, please try again later.", + "unknownError": "Error occured during claim request, please try again later.", + "noMobileClaim": "Claiming is currently only available on the web extension on desktop" }, "accountPassword": { "heading": "", @@ -437,7 +446,7 @@ "decryptingPrivateKey": "Decrypting private key", "showSeedPhrase": "Show seed phrase", "seedRecoveryHeading": "Show seed phrase", - "seedRecoverySmall": "Reveals your 12 words used for generating your private key", + "seedRecoverySmall": "Your seed phrase (also referred to as private key) serves as the keys or a password to access your account. Never disclose this to anyone. And make sure you back it up on a piece of paper that no one else can see—but that you will never lose. Losing these keys means losing access to your wallet and tips", "seedRecoveryBtn": "Show seed phrase", "seedPhraseWarning": "Do not share your seed with anyone, it can be used to steal all your accounts", "seedPhrase": "Your seed phrase", @@ -503,7 +512,9 @@ "tabAbout": "About", "tabAboutsmall": "Version, support center and contact info", "tabNetworks": "Manage networks", - "tabNetworksSmall": "Connect to custom node" + "tabNetworksSmall": "Connect to custom node", + "tabRemoveAccount": "Remove account", + "tabRemoveAccountSmall": "Remove account from the wallet and delete extension storage" }, "signAndVerifyMsg": { "backToSignVerifyMsg": "Back to Sign/Verify Message", @@ -630,12 +641,14 @@ "availableLabel": "Available", "confirm": "Confirm", "cancel": "Cancel", - "edit": "Edit AE Details", + "edit": "Edit Tip Details", "whatIsVerifieddUrl": "What is \"Verified\" URL?", "whatIsNotVerifiedUrl": "What is \"Not verified\" URL?", + "enterUrl": "Enter tip url", "notClaimableUrlInfo": "Third party issues prevent us to ensure that tips will be directly delivered to the URL owner. You are sending the tip at your own risk.", "notVerifiedUrlInfo": "This URL has not yet been verified. The owner of the URL has to create account to claim their tokens.", - "verifiedUrlInfo": "If a URL is marked as verified, it means the owner of this URL is already a fellow Superhero — and that is awesome! An AE address has been included in the URL and tips can be claimed." + "verifiedUrlInfo": "If a URL is marked as verified, it means the owner of this URL is already a fellow Superhero — and that is awesome! An AE address has been included in the URL and tips can be claimed.", + "minAmountError": "You need to provide more than 0.01 USD in tokens in order to tip" }, "successTip": { "sendMore": "Send More AE", diff --git a/src/popup/router/components/AmountSend.vue b/src/popup/router/components/AmountSend.vue index 65ad5b446..4fdd23e57 100644 --- a/src/popup/router/components/AmountSend.vue +++ b/src/popup/router/components/AmountSend.vue @@ -1,31 +1,34 @@ @@ -37,7 +40,7 @@ export default { components: { Input, }, - props: ['amountError', 'value'], + props: ['amountError', 'value', 'errorMsg'], data() { return { finalAmount: null, @@ -63,3 +66,31 @@ export default { }, }; + + diff --git a/src/popup/router/components/BoxButton.vue b/src/popup/router/components/BoxButton.vue index 6f6681fa2..38dd570d3 100644 --- a/src/popup/router/components/BoxButton.vue +++ b/src/popup/router/components/BoxButton.vue @@ -1,6 +1,6 @@