diff --git a/.babelrc b/.babelrc index d7ad3fa32..4eab6e529 100644 --- a/.babelrc +++ b/.babelrc @@ -1,15 +1,17 @@ { "plugins": [ "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-transform-spread" + "@babel/plugin-transform-spread", + "@babel/plugin-proposal-class-properties" ], "presets": [ - ["@babel/preset-env", { - "useBuiltIns": "usage", + ["@babel/preset-env", { + "useBuiltIns": "usage", "targets": { // https://jamie.build/last-2-versions "browsers": ["> 0.25%", "not ie 11", "not op_mini all"] - } + }, + "corejs": 3 }] ] } diff --git a/.eslintrc.js b/.eslintrc.js index 16b7919fc..6d22f56ba 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -38,16 +38,9 @@ module.exports = { props: true, ignorePropertyModificationsFor: [ 'state', // for vuex state - 'acc', // for reduce accumulators - 'e' // for e.returnvalue ] }], - // disallow default export over named export - 'import/prefer-default-export': 'off', // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', - "class-methods-use-this": "warn", - "no-empty": "warn", - "no-restricted-globals": "warn" } } diff --git a/.travis.yml b/.travis.yml index 41f04991c..87c26b61f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,16 +12,24 @@ cache: script: - npm run lint -- --no-fix - - npm test - npm run build before_deploy: scripts/before-deploy.sh deploy: - provider: pages - skip_cleanup: true - github_token: $GITHUB_TOKEN - keep_history: true - local_dir: dist/web/root - on: - branch: master + - provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN + keep_history: true + local_dir: dist/web/root + on: + branch: master + - provider: pages + skip_cleanup: true + github_token: $GITHUB_TOKEN_SUPERHEROWALLET + keep_history: true + local_dir: dist/web/root + repo: superherowallet/wallet + target_branch: master + on: + branch: develop diff --git a/config.xml b/config.xml index 42257c4e4..2a47c1ab4 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 bb0a96b9c..91c9eff19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "superhero-wallet", - "version": "0.0.13", + "version": "0.0.14", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -267,6 +267,107 @@ } } }, + "@babel/helper-create-class-features-plugin": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz", + "integrity": "sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3" + }, + "dependencies": { + "@babel/generator": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz", + "integrity": "sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==", + "dev": true, + "requires": { + "@babel/types": "^7.9.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-replace-supers": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", + "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true + }, + "@babel/traverse": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", + "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.0", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.0", + "@babel/types": "^7.9.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, "@babel/helper-create-regexp-features-plugin": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", @@ -455,6 +556,12 @@ "@babel/types": "^7.8.3" } }, + "@babel/helper-validator-identifier": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", + "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "dev": true + }, "@babel/helper-wrap-function": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", @@ -504,6 +611,16 @@ "@babel/plugin-syntax-async-generators": "^7.8.0" } }, + "@babel/plugin-proposal-class-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", + "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-proposal-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", @@ -2488,29 +2605,57 @@ "version": "github:aeternity/aepp-raendom#9bf50b4c526e81ee6d26f3eb57c7becfba3cdd5e", "from": "github:aeternity/aepp-raendom#feature/layout-superhero", "requires": { - "@aeternity/aepp-sdk": "7.1.1", + "@aeternity/aepp-sdk": "7.2.1", "axios": "^0.19.0", "bignumber.js": "^9.0.0", "bootstrap": "^4.4.1", - "bootstrap-vue": "^2.4.0", + "bootstrap-vue": "^2.9.0", + "core-js": "^3.6.4", "detect-browser": "^4.8.0", - "i18n": "^0.8.5", + "i18n": "^0.8.6", "lodash-es": "^4.17.15", "vue": "^2.6.11", - "vue-i18n": "^8.15.3", - "vue-router": "^3.1.3", - "vuex": "^3.1.2" + "vue-i18n": "^8.16.0", + "vue-router": "^3.1.6", + "vuex": "^3.1.3" }, "dependencies": { + "@aeternity/aepp-sdk": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@aeternity/aepp-sdk/-/aepp-sdk-7.2.1.tgz", + "integrity": "sha512-ok15jB7FB6QkHf3kjFBKQ0GCp/2QHIFYq+TvBh59l6D7pYfb/7eU4/tLZKdxJPqYDtO9I7t3KIzCWG39yCWzhQ==", + "requires": { + "@aeternity/bip39": "^0.1.0", + "@stamp/it": "^1.0.3", + "@stamp/required": "^1.0.1", + "aes-js": "^3.1.1", + "axios": "^0.19.0", + "bignumber.js": "^9.0.0", + "bip32-path": "^0.4.2", + "blakejs": "^1.1.0", + "bs58check": "^2.1.1", + "ed2curve": "^0.3.0", + "joi-browser": "^13.4.0", + "libsodium-wrappers-sumo": "0.7.6", + "ramda": "^0.27.0", + "rlp": "2.2.4", + "serialize-javascript": "^3.0.0", + "sha.js": "^2.4.11", + "tweetnacl": "^1.0.0", + "tweetnacl-auth": "^1.0.1", + "uuid": "^7.0.0", + "websocket": "^1.0.26" + } + }, "bignumber.js": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" }, "bootstrap-vue": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.6.0.tgz", - "integrity": "sha512-6p28wh/nnA5b8H0iVb6cIEkS6VUQikpQPRnCTSNEg3k1T8SNDXads7lJPn1Cxi268SXfrWttb8Pxct1c+0qKyA==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.10.0.tgz", + "integrity": "sha512-N0nsx0VLzUi1DbUPNsShadD57DoUwQ/12lt84iPZTiyxR8qI9rcX0TUEPL9Sof+KCd8f/8cz46bNOK8dhsUKXQ==", "requires": { "@nuxt/opencollective": "^0.3.0", "bootstrap": ">=4.4.1 <5.0.0", @@ -2518,6 +2663,16 @@ "portal-vue": "^2.1.7", "vue-functional-data-merge": "^3.1.0" } + }, + "serialize-javascript": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz", + "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==" + }, + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==" } } }, @@ -3188,6 +3343,11 @@ "regenerator-runtime": "^0.11.0" }, "dependencies": { + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", @@ -5457,9 +5617,9 @@ } }, "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", - "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", + "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" }, "core-js-compat": { "version": "3.6.4", @@ -10026,9 +10186,9 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" }, "i18n": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.8.5.tgz", - "integrity": "sha512-6UgLbhJGgn4XFeuZc/dDdrrri0ij24EK4hxv4Pbi5hloYAZ1B2+0eQchEryBFezLKYOHhVGV/5+H4i0oxng94w==", + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.8.6.tgz", + "integrity": "sha512-aMsJq8i1XXrb+BBsgmJBwak9mr69zPEIAUPb6c5yw2G/O4k1Q52lBxL+agZdQDN/RGf1ylQzrCswsOOgIiC1FA==", "requires": { "debug": "*", "make-plural": "^6.0.1", @@ -11079,6 +11239,11 @@ "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.2.0.tgz", "integrity": "sha512-wKcQS9QC2VHGk7aphWCp1RrFyC0CM6fMgC5prZZ2KV/Lk6OKNoCod9IR6bao+yx3KPY0gZFC5dc+h+KFzCI0Wg==" }, + "jump.js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jump.js/-/jump.js-1.0.2.tgz", + "integrity": "sha1-4GQbR/QKOPITnCX9oFAL8o5DAVo=" + }, "keccak": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/keccak/-/keccak-2.1.0.tgz", @@ -11628,9 +11793,9 @@ } }, "make-plural": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.0.1.tgz", - "integrity": "sha512-h0uBNi4tpDkiWUyYKrJNj8Kif6q3Ba5zp/8jnfPy3pQE+4XcTj6h3eZM5SYVUyDNX9Zk69Isr/dx0I+78aJUaQ==" + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.1.0.tgz", + "integrity": "sha512-0ekbPHqxcdRcmjZ43TkRuejK5rXgMF1OjG4FVnVHgCvOcjrexaSX7a0dfAvqhOm1qWPgjYnXtmz3cHpHW5ZewA==" }, "mamacro": { "version": "0.0.3", @@ -12305,9 +12470,9 @@ "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=" }, "mustache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.0.tgz", - "integrity": "sha512-FJgjyX/IVkbXBXYUwH+OYwQKqWpFPLaLVESd70yHjSDunwzV2hZOoTBvPf4KLoxesUzzyfTH6F784Uqd7Wm5yA==" + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.1.tgz", + "integrity": "sha512-yL5VE97+OXn4+Er3THSmTdCFCtx5hHWzrolvH+JObZnUYwuaG7XV+Ch4fR2cIrcYI0tFHxS7iyFYl14bW8y2sA==" }, "mute-stream": { "version": "0.0.7", @@ -19023,6 +19188,24 @@ "rollup-plugin-node-resolve": "^2.0.0" } }, + "vue-tour": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vue-tour/-/vue-tour-1.3.0.tgz", + "integrity": "sha512-hLXA8vCCWNNjvXwEbfOagcZfJMz1a9Xi7LTN5nb/Nqpuv8RKT25dS5/HJBvHEEh1EoYQNOwohx1YA6x+2KTQbQ==", + "requires": { + "hash-sum": "^2.0.0", + "jump.js": "^1.0.2", + "popper.js": "^1.16.0", + "vue": "^2.6.10" + }, + "dependencies": { + "hash-sum": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz", + "integrity": "sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==" + } + } + }, "vuex": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.1.2.tgz", diff --git a/package.json b/package.json index a12fe035e..5c50c6f21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superhero-wallet", - "version": "0.0.13", + "version": "0.0.14", "description": "Superhero wallet", "author": "SuperHero", "license": "MIT", @@ -81,6 +81,7 @@ "vue-qr-reader": "^1.6.0", "vue-qrcode-reader": "^2.1.1", "vue-router": "^3.1.5", + "vue-tour": "^1.3.0", "vuex": "^3.1.1", "web3": "^1.2.2", "webextension-polyfill": "^0.3.1", @@ -89,6 +90,7 @@ }, "devDependencies": { "@babel/core": "^7.6.4", + "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-optional-chaining": "^7.6.0", "@babel/preset-env": "^7.6.3", "@cypress/webpack-preprocessor": "^4.1.3", @@ -101,7 +103,7 @@ "cordova": "^9.0.0", "cordova-plugin-whitelist": "^1.3.4", "cordova-res": "^0.9.0", - "core-js": "^2.6.10", + "core-js": "^3.6.4", "cross-env": "^5.2.1", "css-loader": "^0.28.11", "cypress": "^4.1.0", @@ -145,7 +147,7 @@ "cordova-plugin-inappbrowser": {}, "ionic-plugin-deeplinks": { "URL_SCHEME": "superhero", - "DEEPLINK_HOST": "mobile.z52da5wt.xyz" + "DEEPLINK_HOST": "wallet.superhero.com" } }, "platforms": [ diff --git a/resources/icon.png b/resources/icon.png index 0090d78f8..b2a5a22b7 100644 Binary files a/resources/icon.png and b/resources/icon.png differ diff --git a/resources/splash.png b/resources/splash.png index f1bddb21e..7dbc43c35 100644 Binary files a/resources/splash.png and b/resources/splash.png differ diff --git a/serve.json b/serve.json index 2292d51a8..26e45055f 100644 --- a/serve.json +++ b/serve.json @@ -1,3 +1,3 @@ { - "public": "dist" + "public": "dist/web/root" } \ No newline at end of file diff --git a/src/aepp/App.vue b/src/aepp/App.vue index 45f9b6c9e..b6ba73665 100644 --- a/src/aepp/App.vue +++ b/src/aepp/App.vue @@ -79,7 +79,6 @@ contract Example = nodes: [{ name: process.env.NETWORK, instance: node }], compilerUrl: networks[process.env.NETWORK].COMPILER_URL, onNetworkChange(params) { - // eslint-disable-next-line no-alert if (this.getNetworkId() !== params.networkId) alert(`Connected network ${this.getNetworkId()} is not supported with wallet network ${params.networkId}`); }, onAddressChange: async () => { @@ -126,22 +125,19 @@ contract Example = }; }, async scanForWallets() { - try { - // eslint-disable-next-line func-names - const handleWallets = async function({ wallets, newWallet }) { - const wallet = newWallet || Object.values(wallets)[0]; - this.detector.stopScan(); + const handleWallets = async ({ wallets, newWallet }) => { + const wallet = newWallet || Object.values(wallets)[0]; + this.detector.stopScan(); - await this.connectToWallet(wallet); - // let addr = await this.client.askAddresses() - }; + await this.connectToWallet(wallet); + // let addr = await this.client.askAddresses() + }; - const scannerConnection = await BrowserWindowMessageConnection({ - connectionInfo: { id: 'spy' }, - }); - this.detector = await Detector({ connection: scannerConnection }); - this.detector.scan(handleWallets.bind(this)); - } catch (e) {} + const scannerConnection = await BrowserWindowMessageConnection({ + connectionInfo: { id: 'spy' }, + }); + this.detector = await Detector({ connection: scannerConnection }); + this.detector.scan(handleWallets); }, }, }; diff --git a/src/aepp/aepp.js b/src/aepp/aepp.js index fa15a1e70..6e1307818 100644 --- a/src/aepp/aepp.js +++ b/src/aepp/aepp.js @@ -3,8 +3,6 @@ import App from './App'; global.browser = require('webextension-polyfill'); -/* eslint-disable no-new */ new Vue({ - el: '#app', render: h => h(App), -}); +}).$mount('#app'); diff --git a/src/background.js b/src/background.js index b3e36df68..663e3a22b 100644 --- a/src/background.js +++ b/src/background.js @@ -1,9 +1,8 @@ import { setInterval } from 'timers'; import './lib/initPolyfills'; import { phishingCheckUrl, getPhishingUrls, setPhishingUrl } from './popup/utils/phishing-detect'; -import { extractHostName, detectConnectionType } from './popup/utils/helper'; +import { detectConnectionType } from './popup/utils/helper'; import { buildTx } from './popup/utils'; - import WalletController from './wallet-controller'; import Notification from './notifications'; import rpcWallet from './lib/rpcWallet'; @@ -16,13 +15,12 @@ import { PopupConnections } from './lib/popup-connection'; const controller = new WalletController(); -if (process.env.IS_EXTENSION) { +if (process.env.IS_EXTENSION && require.main.i === module.id) { RedirectChainNames.init(); setInterval(() => { browser.windows.getAll({}).then(wins => { if (wins.length === 0) { sessionStorage.removeItem('phishing_urls'); - browser.storage.local.remove(['isLogged', 'activeAccount']); } }); }, 5000); @@ -30,33 +28,30 @@ if (process.env.IS_EXTENSION) { const notification = new Notification(); setController(controller); - const postPhishingData = data => { - browser.tabs.query({ active: true, currentWindow: true }).then(tabs => { - const message = { method: 'phishingCheck', data }; - tabs.forEach(({ id }) => browser.tabs.sendMessage(id, message)); - }); + const postPhishingData = async data => { + const tabs = await browser.tabs.query({ active: true, currentWindow: true }); + const message = { method: 'phishingCheck', data }; + tabs.forEach(({ id }) => browser.tabs.sendMessage(id, message)); }; browser.runtime.onMessage.addListener(async (msg, sender) => { switch (msg.method) { case 'phishingCheck': { const data = { ...msg, extUrl: browser.extension.getURL('./') }; - const host = extractHostName(msg.params.href); + const host = new URL(msg.params.href).hostname; data.host = host; - phishingCheckUrl(host).then(res => { - if (res.result === 'blocked') { - const whitelist = getPhishingUrls().filter(url => url === host); - if (whitelist.length) { - data.blocked = false; - return postPhishingData(data); - } - data.blocked = true; + const { result } = await phishingCheckUrl(host); + if (result === 'blocked') { + const whitelist = getPhishingUrls().filter(url => url === host); + if (whitelist.length) { + data.blocked = false; return postPhishingData(data); } - data.blocked = false; + data.blocked = true; return postPhishingData(data); - }); - break; + } + data.blocked = false; + return postPhishingData(data); } case 'setPhishingUrl': { const urls = getPhishingUrls(); @@ -115,6 +110,7 @@ if (process.env.IS_EXTENSION) { }); } +// eslint-disable-next-line import/prefer-default-export export const handleMessage = ({ type, payload }) => { if (HDWALLET_METHODS.includes(type)) { return controller[type](payload); diff --git a/src/common/base.scss b/src/common/base.scss index 997ef736a..f4258bf0e 100644 --- a/src/common/base.scss +++ b/src/common/base.scss @@ -225,23 +225,6 @@ main { } .transactionList, .allTransactions { padding: 0px 0 0px 0!important; - .ae-badge.primary { - background:$primary-color; - } - .ae-badge.alternative{ - background:$color-alternative; - } - .ae-badge.secondary{ - background:$color-secondary; - } - .ae-badge { - background:#929CA6; - color:#fff !important; - font-size:.7rem; - } -} -.allTransactions .ae-identicon { - margin-left: 1rem; } .transactionsPadding { padding:1rem !important; diff --git a/src/common/extension.scss b/src/common/extension.scss index 8ebbc2df1..d0c0d478d 100644 --- a/src/common/extension.scss +++ b/src/common/extension.scss @@ -100,6 +100,15 @@ a { .uppercase { text-transform: uppercase; } +.underline { + text-decoration: underline; +} +.bolder { + font-weight: bold; +} +.italic { + font-style: italic; +} .link-sm { font-size:11px; margin:8px 0; diff --git a/src/common/variables.scss b/src/common/variables.scss index 572e0dcfe..6e2ff379b 100644 --- a/src/common/variables.scss +++ b/src/common/variables.scss @@ -24,10 +24,15 @@ $button-color: #3F4048; $button-text-color: #CFCFCF; $placeholder-color: #67676D; $text-color: #BCBCC4; -$accent-color: #6A8EBE; -$secondary-color: #FF4784; +$accent-color: #67f7b8; +$secondary-color: #2a9cff; $nav-bg-color: #21212A; +$input-focus-color: #67f7b8; +$input-error-color: #2a9cff; +$transactions-bg: #12121b; $nav-border-color: #3A3A47; +$tx-border-color: #33343e; +$box-button-color: #33343e; $scrollbar-color:#707075; $submenu-bg: #1B1B23; $black-color: #000; diff --git a/src/icons/activity-icon.svg b/src/icons/activity-icon.svg new file mode 100644 index 000000000..44f52dfa8 --- /dev/null +++ b/src/icons/activity-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/icons/arrow-down.png b/src/icons/arrow-down.png new file mode 100644 index 000000000..39a948615 Binary files /dev/null and b/src/icons/arrow-down.png differ diff --git a/src/icons/arrow-up.png b/src/icons/arrow-up.png new file mode 100644 index 000000000..de4e67574 Binary files /dev/null and b/src/icons/arrow-up.png differ diff --git a/src/icons/bell.svg b/src/icons/bell.svg index af34b5796..231cd3995 100644 --- a/src/icons/bell.svg +++ b/src/icons/bell.svg @@ -1,7 +1,5 @@ - - - - - - + + + + diff --git a/src/icons/claim-icon.svg b/src/icons/claim-icon.svg new file mode 100644 index 000000000..14c21dc75 --- /dev/null +++ b/src/icons/claim-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/icons/copy.svg b/src/icons/copy.svg index 1052f943d..bec05611e 100644 --- a/src/icons/copy.svg +++ b/src/icons/copy.svg @@ -1,7 +1,7 @@ - + - - + + diff --git a/src/icons/expanded-angle-arrow.svg b/src/icons/expanded-angle-arrow.svg index 358722848..0d13234b6 100644 --- a/src/icons/expanded-angle-arrow.svg +++ b/src/icons/expanded-angle-arrow.svg @@ -1,6 +1,3 @@ - - - - - + + diff --git a/src/icons/eye.png b/src/icons/eye.png index 81dcdf973..326f5ab70 100644 Binary files a/src/icons/eye.png and b/src/icons/eye.png differ diff --git a/src/icons/hamburger.svg b/src/icons/hamburger.svg index 9678c9600..bf393a1e9 100644 --- a/src/icons/hamburger.svg +++ b/src/icons/hamburger.svg @@ -1,7 +1,3 @@ - - - - - - + + diff --git a/src/icons/help-icon.svg b/src/icons/help-icon.svg new file mode 100644 index 000000000..a0af3fc24 --- /dev/null +++ b/src/icons/help-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/icons/hero.svg b/src/icons/hero.svg new file mode 100644 index 000000000..e7c595ac0 --- /dev/null +++ b/src/icons/hero.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/icons/icon_128.png b/src/icons/icon_128.png index 82eef9d2d..d7c8ceba8 100644 Binary files a/src/icons/icon_128.png and b/src/icons/icon_128.png differ diff --git a/src/icons/icon_48.png b/src/icons/icon_48.png index 01c80c064..b06341c4d 100644 Binary files a/src/icons/icon_48.png and b/src/icons/icon_48.png differ diff --git a/src/icons/logo-small.svg b/src/icons/logo-small.svg index af12c2b96..36d49dba2 100644 --- a/src/icons/logo-small.svg +++ b/src/icons/logo-small.svg @@ -1,12 +1,3 @@ - - - - - - - - - - - + + diff --git a/src/icons/logo.svg b/src/icons/logo.svg index a5cc649c4..6fd9afcec 100644 --- a/src/icons/logo.svg +++ b/src/icons/logo.svg @@ -1,13 +1,10 @@ -

To read more about this site please review the domain on .

Note that this warning list is compiled on a voluntary basis. This list may be inaccurate or incomplete. Just because a domain does not appear on this list is not an implicit guarantee of that domain's safety. As always, your transactions are your own responsibility. If you wish to interact with any domain on our warning list, you can @@ -74,7 +73,7 @@ export default { diff --git a/src/phishing/phishing.html b/src/phishing/phishing.html index b3ba65d37..7fa014338 100644 --- a/src/phishing/phishing.html +++ b/src/phishing/phishing.html @@ -7,6 +7,6 @@

- + diff --git a/src/popup/App.vue b/src/popup/App.vue index 2103a19cb..f1362474f 100644 --- a/src/popup/App.vue +++ b/src/popup/App.vue @@ -12,6 +12,7 @@ + @@ -19,45 +20,42 @@ import { mapGetters } from 'vuex'; import { clearInterval, setInterval } from 'timers'; import { AEX2_METHODS } from './utils/constants'; -import { postMessage, readWebPageDom } from './utils/connection'; -import { getCurrencies } from './utils/helper'; +import { postMessage } from './utils/connection'; import { fetchAndSetLocale } from './utils/i18nHelper'; +import { detectBrowser } from './utils/helper'; import Header from './router/components/Header'; import SidebarMenu from './router/components/SidebarMenu'; import NodeConnectionStatus from './router/components/NodeConnectionStatus'; +import Tour from './router/components/Tour'; export default { components: { Header, SidebarMenu, NodeConnectionStatus, + Tour, }, data: () => ({ showSidebar: false, }), computed: { - ...mapGetters(['account', 'current', 'mainLoading', 'sdk', 'isLoggedIn', 'aeppPopup', 'notifications']), + ...mapGetters(['account', 'current', 'mainLoading', 'sdk', 'isLoggedIn', 'aeppPopup', 'notifications', 'notificationsCounter', 'backedUpSeed']), waveBg() { return ['/intro', '/popup-sign-tx', '/connect', '/importAccount', '/receive'].includes(this.$route.path); }, }, async created() { - const { language } = await browser.storage.local.get(['language']); - - this.$store.state.current.language = language; - if (language) fetchAndSetLocale(language); - - if (process.env.IS_EXTENSION) { - readWebPageDom((receiver, sendResponse) => { - this.$store.commit('SET_TIPPING_RECEIVER', receiver); - sendResponse({ host: receiver.host, received: true }); - }); - } + this.$watch( + ({ current: { language } }) => [language], + ([language]) => { + fetchAndSetLocale(language); + } + ); this.checkSdkReady(); - this.getCurrencies(); + this.$store.dispatch('getCurrencies'); - if (process.env.IS_EXTENSION) { + if (process.env.IS_EXTENSION && detectBrowser() !== 'Firefox') { const [update] = await browser.runtime.requestUpdateCheck(); if (update === 'update_available' && !process.env.RUNNING_IN_TESTS) { this.$store.commit('ADD_NOTIFICATION', { @@ -74,52 +72,35 @@ export default { route: '', }); } - if (!(await this.$store.dispatch('checkBackupSeed'))) { + if (!this.backedUpSeed) { this.$store.commit('ADD_NOTIFICATION', { title: '', content: `${this.$t('pages.account.youNeedTo')} ${this.$t('pages.account.backup')} ${this.$t('pages.account.yourSeedPhrase')}`, route: '/securitySettings', }); } - const { notifCounter } = await browser.storage.local.get('notifCounter'); - if (notifCounter !== 0) await browser.storage.local.set({ notifCounter: this.notifications.length }); + if (this.notificationsCounter !== 0) this.$store.commit('SET_NOTIFICATIONS_COUNTER', this.notifications.length); }, methods: { - checkSdkReady() { - const checkSDKReady = setInterval(async () => { - if (this.sdk) { - if (!window.RUNNING_IN_POPUP && process.env.IS_EXTENSION) { - postMessage({ type: AEX2_METHODS.INIT_RPC_WALLET, payload: { address: this.account.publicKey, network: this.current.network } }); - } - this.pollData(); - clearInterval(checkSDKReady); - } - }, 100); + async checkSdkReady() { + await this.$watchUntilTruly(() => this.sdk); + if (!window.RUNNING_IN_POPUP && process.env.IS_EXTENSION) { + postMessage({ type: AEX2_METHODS.INIT_RPC_WALLET, payload: { address: this.account.publicKey, network: this.current.network } }); + } + this.pollData(); }, pollData() { let triggerOnce = false; - this.polling = setInterval(async () => { - if (this.sdk != null && this.isLoggedIn) { - if (!process.env.RUNNING_IN_TESTS) this.$store.dispatch('updateBalance'); - if (!triggerOnce) { - this.$store.dispatch('getRegisteredNames'); - triggerOnce = true; - } + 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; } }, 2500); + this.$once('hook:beforeDestroy', () => clearInterval(polling)); }, - async getCurrencies() { - const { currency } = await browser.storage.local.get('currency'); - const currencies = await getCurrencies(); - this.$store.commit('SET_CURRENCIES', currencies); - this.$store.commit('SET_CURRENCY', { - currency: currency || this.current.currency, - currencyRate: currency ? currencies[currency] : currencies[this.current.currency], - }); - }, - }, - beforeDestroy() { - clearInterval(this.polling); }, }; diff --git a/src/popup/cameraPermission.js b/src/popup/cameraPermission.js index fad8d3ef7..bdfecc53b 100644 --- a/src/popup/cameraPermission.js +++ b/src/popup/cameraPermission.js @@ -3,7 +3,6 @@ if (navigator.userAgent.indexOf('Firefox') !== -1) { navigator.mediaDevices .getUserMedia({ video: true }) .then(() => { - browser.storage.local.set({ firefoxCameraAllowed: true }); alert('You have allowed the firefox camera. Now, try again scan QR code'); }) .catch(err => { diff --git a/src/popup/locales/en.json b/src/popup/locales/en.json index 080977933..ac8964c00 100644 --- a/src/popup/locales/en.json +++ b/src/popup/locales/en.json @@ -1,4 +1,38 @@ { + "onboarding": { + "step_1": { + "title": "Your Account Info", + "content": "This block contains information about your wallet account and its status:
1. Your account address and .chain name ( if you already have one ).
2. Your current wallet balance. " + }, + "step_2": { + "title": "Send Tip", + "content": "To send AE, open the wallet while the URL you want to tip is on your active tab. Fill in how much you want to tip and add a message along with that tip. Hit Send and confirm." + }, + "step_3": { + "title": "What is \"Verified\" URL", + "content": "If a URL is marked as verified, it means the owner of this URL is already a fellow Superhero—and that is awesome!" + }, + "step_4": { + "title": "Claim Tip", + "content": "Hit this button to trigger tip collection—all tips you’ve received from URLs where you’ve added your AE address will then be added to your balance." + }, + "step_5": { + "title": "Activity", + "content": "This tab will show you a full log of your recent activity using the Superhero Wallet." + }, + "step_6": { + "title": "Top Up", + "content": "You can top up your wallet by swapping ETH or BTC into AE, or by purchasing AE using your credit card. It’s very easy." + }, + "step_7": { + "title": "Withdraw", + "content": "You can easily withdraw your tips by sending them out to AE wallet addresses from your accounts in exchanges or external wallets, provided that they support AE tokens. You can then exchange them for other cryptocurrencies or withdraw to your bank." + }, + "step_8": { + "title": "Settings", + "content": "You can view your security phrase (also referred to as seedphrase or private keys) and change your language settings." + } + }, "pages": { "intro": { "heading": "Intro", @@ -35,7 +69,9 @@ "notifications": "Notifications", "names": "Names", "bidding": "Bidding", - "networks": "Networks" + "networks": "Networks", + "comment-new": "Add comment", + "home": "Superhero Home" }, "appVUE": { "systemName": "SuperHero", @@ -79,7 +115,8 @@ "heading": "Account", "accountName": "Account name", "copy": "Copy address", - "send": "Send Tips", + "send": "Send AE", + "claim": "Claim AE", "receive": "Receive", "wholeTransaction": "Whole transaction history", "latestTransactions": "Latest transactions", @@ -94,6 +131,17 @@ "updateExtension": "New verison available! Please update your extension!", "updateAvailable": "New verison in store avaible!" }, + "claim": { + "claim": "Claim tips", + "noZeroClaim": "There are no tips to be claimed for this URL.", + "noAddress": "Address not found", + "errorClaim": "Error claiming", + "ae": "AE tokens", + "claimed": " Claim request sent! ", + "url": "URL", + "tipsOnUrl": "Tips on this URL" + + }, "accountPassword": { "heading": "", "passwordSymbolsError": "Required minimum symbols - ", @@ -468,10 +516,29 @@ }, "termsOfService": { "backButton": "Back", - "heading": "Terms of use", - "sub-heading": "The present ​TERMS OF USE​ were created on 13 February 2020.", - "section0Content": "Superhero.com ​reserves its right to modify and update these ​TERMS OF USE ​according to the policy and practice of the company. The new version of the ​TERMS OF USE becomes effective from the day it is announced on Our​ Superhero Wallet​ unless stated otherwise.", - "section01Content": "\n THE SOFTWARE IS PROVIDED BY Superhero.com “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. These ​TERMS OF USE („​TERMS​“) apply exclusively for the SuperHero Wallet (hereinafter referred to as the “Wallet” or the “application”) and all the content available on ​the website extension​. Please make sure that you have carefully read the ​TERMS before using the application​. Otherwise, by using the ​application​, we consider these actions implicit agreement to the TERMS OF USE​. These ​TERMS OF USE represent a binding agreement between you, the legal entity you represent and the legal entity that registered you (collectively „​YOU​“) and Superhero.com LVC, Dr. Grass Str 12, 9490 Vaduz, Liechtenstein (Superhero.com ”, “we”, “us” or “our”) ​in connection to your use of the SuperHero Wallet​ ​website extension​. Please, do not use the application provided by Superhero.com ​, if you do not agree to the ​TERMS applied within this document. Once you agree to the ​TERMS OF USE,​ we consider this an explicit consent to the following:", + "terms-of-use": "Terms of use", + "terms-with-quotes": "(„TERMS“)", + "terms": "terms", + "sub-heading": "The present {terms-of-use} were created on 3 th April 2020.", + "section0Content": "{superhero.com} reserves its right to modify and update these {terms-of-use} according to the policy and practice of the {company}. The new version of thе {terms-of-use} becomes effective from the day it is announced on {our-superhero-wallet} unless stated otherwise.", + "superhero-com": "Superhero.com LVC", + "company": "company", + "our-superhero-wallet": "Our Superhero Wallet", + "section01Content": "THE SOFTWARE IS PROVIDED BY SUPERHERO.COM LVC “AS IS” WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + + + "section02Content": "These {terms-of-use} {terms-with-quotes} apply exclusively for the {superHero-wallet} (hereinafter referred to as the “{wallet}“ or the “{application}”) and all the content available on the {website-extension}. Please make sure that you have carefully read the {terms} before using the {application}. Otherwise, by using it, we consider these actions implicit agreement to the {terms-of-use}. These {terms-of-use} represent a binding agreement between you, the legal entity you represent and the legal entity that registered you (collectively „{you}“) and Superhero.com LVC {superhero-we-us-with-quotes} or {our-with-quotes} in connection to your use of the {superHero-wallet} {website-extension}.", + "superHero-wallet": "SuperHero Wallet", + "wallet": "Wallet", + "application": "application", + "website-extension": "website extension", + "you": "you", + "superhero-we-us-with-quotes": "(“Superhero”, “we”, “us”", + "our-with-quotes": "“our”)", + + + + "section1Title": "1. Definitions", "section1Content": "1.1. Superhero.com Establishment (Superhero.com ”, “we”, “us”, “our” or “the company”) ​is a company with email address for communication related to SuperHero Wallet: superherowallet@protonmail.com. Superhero.com ​is the company, which created and developed SuperHero Wallet​. \n 1.2. ​„USER“ or ​„YOU“ means a natural or legal person, who has downloaded and uses the SuperHero Wallet ​website extension. \n 1.3. „​Blockchain​“ means the list of records, also known as ​blocks,​ which are linked with the method of cryptography. The technology allows large groups of people to connect and reach agreement on data, which is afterwards permanently recorded without the presence of central authority. ​USERS can access, create and save information on the aeternity blockchain. The decentralized, distributed and public digital ledger is used for the purpose of recording transactions in blocks of information with the help of ​Validators​, which cannot be altered retroactively. \n 1.4. SuperHero Wallet​” (“​WALLET​” or “​the application​”) is a website extension, which allows supporters to send value to content creators, causes, charities, groups, or regular individuals online as a reward for contributing accurate information, relevant insights, quality content. The website extension is a piece of software which acts as an add-on to the web browser Firefox and contributes to the browser’s additional functionality. The application is available at: https://addons.mozilla.org/en-US/firefox/addon/superhero-wallet-extension/ . The results of the donations and comments are published on the website ​https://youdonotneedacapetobeahero.com/​ . \n 1.5. “​Validators​” are independent physical persons or entities, which are not in any way part of Superhero.com . ​Their function in the system includes responsibility for ​blocks constitution and broadcast of these ​blocks​ with the​ aeternity ​network. \n 1.6. “​Account address​” is a hashed version of the ​USER’s ​public key​, used to identify USERS​ on ​the application​. \n 1.7. “​Keys​” represent uniquely related private and public cryptographic keys of random numbers used for encryption and decryption of information.", "section2Title": "2. GENERAL PROVISIONS", @@ -480,18 +547,19 @@ "section3Content": "The application uses ​Account address​ for identification of ​USERS​. \n For ​USERS to send Superhero.com tokens, they should share only their account address. Any other information is not shared or collected by the application. Once a ​USER has downloaded the application, the ​Wallet ​automatically generates the account address. ​For more information about the processing of the account address, please read the Privacy Policy of the application.", "section4Title": "​4. USERS OBLIGATIONS", "section4Content": "As a ​USER​, ​You​ agree to the following rules applicable for Superhero.com ​: \n ● You ​shall comply with the rules set within the present ​TERMS and perform any actions on the application in good faith and according to the applicable legislation; \n ● You are an adult and ​YOU are not persons under judicial disability (​You have obtained full legal capacity); \n ● You shall not try to obtain or gain access over any personal or identifiable information, including but not limited to recover passphrases, from other ​USERS​, nor shall ​You​ disclose such information about yourself; \n ● You shall not in any way compromise or exploit the application or use the application for any illegal activity or outside the purpose for its creation; \n ● Your actions do not in any manner mislead into thinking that ​You are another person or company; ​You shall not purposefully provide information by using another person’s recover phrases, account addresses, etc. with the purpose of representing as somebody else. Superhero.com ​shall undertake any possible action against such identity thefts and frauds in case ​the company​ suspects a ​USER​; \n ● the device ​You use does not contain or install any viruses, worms, malware, Trojan horses or other harmful or destructive content; \n USERS​ shall be liable for any action undertaken in violation of the present article.", - "section5Title": "5. WARRANTY DISCLAIMERS", + "section5Title": "5. WARRANTY and LIABILITY DISCLAIMERS", "section5Content": "\n General Disclaimer: The Superhero.com ​network is open-source, public and permissionless blockchain, meaning that anyone can download, participate, develop, improve and validate transactions on the blockchain. Superhero.com ​cannot and does not control in any way the transactions conducted by USERS​. Superhero.com ​does not ensure the trustworthiness and validity of the same. Please, bear in mind that every ​USER is solely responsible for the actions undertaken on the application and the information presented by them. \n Password and Security Disclaimer: ​USERS take responsibility for their digital security. The application ​gives the possibility to set up a recovery passphrase, consisting of random unique combination of words. The purpose of the recovery passphrase is to restore the access to the account, once the ​USER has lost access to the original ​Wallet​. Superhero.com does not collect the private keys or the recovery passphrases and shall not be treated under any circumstances as a custodian wallet provider. ​WE HIGHLY RECOMMEND ALL USERS TO SET UP A RECOVERY PASSPHRASE AND PROTECT IT. ​Therefore​, USERS should store their recovery passphrase offline safely. Please bear in mind that if a USER has not set up a recovery passphrase for backup or they have forgotten the recovery passphrase and its exact wording, the access to their accounts can be permanently restricted. The lack of access does not mean in any way that the Superhero.com tokens ​are lost. The ​tokens ​remain available, however, they cannot be controlled, transferred and any other action with them cannot be undertaken. Superhero.com ​shall not be held liable in any case of lost, forgotten or misspelled recovery passphrases. In addition, ​USERS ​must not share their recovery passphrase with anyone. Superhero.com ​should not be liable for any claim, damages or other liability, tort or otherwise, arising from, out of or in connection with the impossibility of ​USERS to regain access to their account​ on the ​Wallet​. \n Please bear in mind that the option “Already have an account? Retrieve existing account” is applicable only in case the ​USER​ has a recovery passphrase. \n Decentralization and Control Transparency Disclaimer: ​Blockchain technology is decentralized by nature- which means that the makers of ​the Wallet cannot access or freeze your account; recover or reset your recovery passphrase; reverse, cancel or refund transactions. Only ​USERS are in charge of the safe storage and sending of their funds. By agreeing to the present ​TERMS​, ​USERS accept and guarantee to defend, indemnify and hold Superhero.com ​harmless from and against any and all claims, costs, expenses, including but not limited to attorneys’ fees, damages, etc., related to or arising from the use of ​the application​. \n Access and Connectivity Disclaimer: ​The Wallet ​can be downloaded from https://addons.mozilla.org/en-US/firefox/addon/superhero-wallet-extension/​. Please bear in mind that the website can delist or remove ​the application in their own estimation, making it difficult to receive updates. Devices on which the ​Wallet is installed are likely to be harmed by malware/spyware/viruses/cyber-attacks, etc. or during technical support. Damage or loss of the device can possibly result in loss of funds or endanger them. Therefore, please refer to section Password and Security Disclaimer in regard to recovery passphrases. Superhero.com ​is not responsible for any of the above-mentioned access and connectivity troubleshooting. Therefore, ​WE shall not be held liable for any loss of data on ​the application ​caused in these cases. \n Cryptocurrency Guidance Disclaimer: The content presented on the application is not intended to be used as guide for cryptocurrency investments or signing of other legal agreements in connection to cryptocurrencies. Superhero.com ​does not offer business advices, which can be used as a legal basis for any investments or agreements in the sphere. Superhero.com ​shall not be held liable in any case of negative consequences from transactions or non-compliance with obligations of legal agreements signed by ​YOU​, including but not only losses, tort, revenue, income or profits loss arising out of the contracts/ transactions/investment acts/agreements. \n Jurisdiction and Regulatory Disclaimer: ​The access to ​the application is granted worldwide. The use of the application may be technically restricted or prohibited in certain territories and countries depending on the different legal acts. Please, bear in mind that you have to inform yourself about such legal restrictions and you are liable solely in case of a breach of any legal norms. The access to our website is prohibited provided the access point is in a territory where the content is illegal. Superhero.com ​does not have the obligation to control the legislation applicability according to each access point of ​USERS and shall not be held liable in these circumstances. \n USERS understand and accept that the legislation on a national, regional and international levels can introduce new regulations with an object- blockchain technology, tokens, blockchain technology based applications, etc. Therefore, in case of regulatory restrictions, bans and prohibitions, the Superhero.com ​Network development shall be immensely influenced, probably causing its termination. Taking into account the above-mentioned, ​USERS understand that there is no assurance that they will constantly or for indefinite period of time receive any functionality through ​the application ​or the​ Superhero.com tokens​ held by them. \n Risks​: USERS understand and agree with the risks related to Superhero.com ​Contribution and/or with the allocation, use and ownership of Superhero.com tokens ​and guarantee to relieve of responsibility Superhero.com in these cases. The risks mentioned within the present ​TERMS​ are not comprehensive: \n ● Risk of software weaknesses​: ​USERS understand and accept that due to the open-source, decentralized, public, permissionless cloud concept, the software, the blockchain technology, incorporating all elements and ​the application are in a constant development process. There is no warranty that the receipt and transfer of Superhero.com tokens ​shall be uninterrupted or error-free at all times. ​USERS accept and guarantee to dispense of responsibility Superhero.com ​for any software or technology weaknesses, malfunctions, vulnerabilities or bugs, which can cause complete or partial loss of Superhero.com tokens. \n ● Risk of theft: ​USERS understand and accept that due to the open-source, decentralized, public, permissionless cloud concept, the software, the application, the Superhero.com ​Network and the other blockchain technology related elements may be exposed to hacker attacks or other harmful individuals. These actions could result including but not limited to theft or loss of Superhero.com tokens. \n ● Risk of mining attacks: ​USERS understand and accept that due to Superhero.com ​blockchain based system, it may be susceptible to mining attacks, including but not limited to double-spend attacks, majority mining power attacks, 'selfish-mining' attacks, and race condition attacks. Any of the above-mentioned attacks could for example result in disturbance of the transactions on ​the application​. \n ● Risk of phishing attacks and ​forks​: ​USERS understand and accept that the application can be an object of phishing attacks. Highly possible results are the steal of data and credentials. The phishing attacks represent masquerade of an attacker as an authentic and trusted entity and the creation of an application/ website with high percentage of resemblance with the original one. ​USERS should be careful when they download and use ​the ​application​. ​USERS can identity the authentic Wallet ​by verifying that the developer on the marketplace is Superhero.com / Superhero.com LVC. \n Due to the fact Superhero.com blockchain is public and permissionless, any person has the possibility to create a “​fork​”. Any developer can copy and develop the source code resulting in the formation of a distinct and separate software. ​USERS understand and accept that Superhero.com ​cannot avoid the creation of such ​forks and is not responsible for them. Superhero.com ​shall not be held liable for any losses and/or damages resulted from the use of ​forks​.", "section6Title": "6. TAXES AND FEES", "section6Content": "The Wallet does not collect any fees or taxes for the use of ​the application- ​it is free of charge. However, taxes and fees are payable for the transactions on the Superhero.com blockchain including but not limited to miner fees, gas tax, transaction fee. The amounts of the taxes and fees are fixed unilaterally. \n In addition, depending on the territory access point, the transfer and receipt of funds through the application may be an object of tax and fee payments to public authorities in different countries depending on the legal regulations. ​USERS are obliged to inform themselves about such requirements and are solely responsible for their donations.", - "section7Title": "7. THIRD-PARTY WEBSITES, APPLICATIONS AND NETWORKS", + "section7Title": "7. THIRD-PARTY PLATFORMS", "section7Content": "In order to donate, ​USERS should copy and paste in the Section “Send a tip to” the URL of a website to which they would like to donate. Please bear in mind that the applications is created in order for people to stimulate the full, transparent, useful and accurate information worldwide. Therefore, ​USERS shall be fully liable for any use of the ​Wallet in violation of the purpose of the ​Wallet and the present Terms. Superhero.com ​does not control the websites the donations are sent to. Superhero.com ​is not responsible for the content on the websites in any way.", - "section8Title": "8. INTELLECTUAL PROPERTY RIGHTS ON THE APPLICATION", + "section8Title": "8. LICENSE", "section8Content": "The application is created, developed and operated by Superhero.com ​. Each component on the application including but not limited to logos, trademarks and other intellectual property displayed on the application are considered a property of Superhero.com ​and are protected by the applicable intellectual property legislation. It is prohibited to use any intellectual property of Superhero.com ​before a prior explicit consent from the latter. \n None of the elements mentioned above can be edited, downloaded, reproduced, used for commercial purposes, distributed and transmitted in any manner and/or any medium whatsoever, partially or in whole, without the explicit prior written consent of Superhero.com. \n Superhero.com ​reserves its right to take any necessary legal action against intellectual property infringement.", - "section9Title": "9. MODIFICATIONS", + "section9Title": "9. INTELLECTUAL PROPERTY RIGHTS", "section9Content": "USERS understand and accept ​the application can be periodically modified, updated, maintained or technically supported, which could to some extent influence the use of the Wallet​, the visual representation of ​the application ​or could result in malfunction. In the latter case, if ​You as a ​USER notice any change in the funds, settings, accounts or any other information on the application, please superherowallet@protonmail.com​ for assistance.", - "section10Title": "10. FINAL PROVISIONS", - "section10Content": "The legislation and jurisdiction of Liechtenstein is applied for the issues outstanding the present ​TERMS​. The invalidity of one or more clauses/ provisions in the ​TERMS does not lead to the invalidity of the whole agreement. \n The Privacy Policy is an inseparable part of the present ​TERMS and should be considered as a complementary document with compulsory character. Unless explicitly stated otherwise in the Privacy Policy, all rules from the ​TERMS​ apply respectively." + "section10Title": "10. MODIFICATIONS", + "section10Content": "The legislation and jurisdiction of Liechtenstein is applied for the issues outstanding the present ​TERMS​. The invalidity of one or more clauses/ provisions in the ​TERMS does not lead to the invalidity of the whole agreement. \n The Privacy Policy is an inseparable part of the present ​TERMS and should be considered as a complementary document with compulsory character. Unless explicitly stated otherwise in the Privacy Policy, all rules from the ​TERMS​ apply respectively.", + "section11Title": "10. FINAL PROVISIONS" }, "tipPage": { "back": "Back", diff --git a/src/popup/popup.js b/src/popup/popup.js index 1fcb1b415..401b1a72f 100644 --- a/src/popup/popup.js +++ b/src/popup/popup.js @@ -1,19 +1,30 @@ import Vue from 'vue'; +import { defer } from 'lodash-es'; import App from './App'; import store from '../store'; import router from './router'; import { i18n } from './utils/i18nHelper'; import '../lib/initEnv'; - -global.browser = require('webextension-polyfill'); +import '../lib/initPolyfills'; Vue.prototype.$browser = global.browser; +Vue.prototype.$watchUntilTruly = function watchUntilTruly(getter) { + return new Promise(resolve => { + const unwatch = this.$watch( + getter, + value => { + if (!value) return; + resolve(); + defer(() => unwatch()); + }, + { immediate: true } + ); + }); +}; -/* eslint-disable no-new */ new Vue({ - el: '#app', store, router, i18n, render: h => h(App), -}); +}).$mount('#app'); diff --git a/src/popup/router/components/AccountInfo.vue b/src/popup/router/components/AccountInfo.vue index da732ac32..6bd4320b2 100644 --- a/src/popup/router/components/AccountInfo.vue +++ b/src/popup/router/components/AccountInfo.vue @@ -1,12 +1,11 @@