diff --git a/babel.config.js b/babel.config.js
index 7904b0dc13..f5cafdbdaf 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -2,7 +2,8 @@ module.exports = {
presets: [
['@babel/preset-env', {
include: [
- '@babel/plugin-proposal-nullish-coalescing-operator'
+ '@babel/plugin-proposal-nullish-coalescing-operator',
+ '@babel/plugin-proposal-logical-assignment-operators'
]
}],
'@babel/preset-typescript'
diff --git a/examples/browser/wallet-iframe/package.json b/examples/browser/wallet-iframe/package.json
index 3591021ff8..9aab56a8da 100644
--- a/examples/browser/wallet-iframe/package.json
+++ b/examples/browser/wallet-iframe/package.json
@@ -1,5 +1,5 @@
{
- "name": "wallet",
+ "name": "wallet-iframe",
"version": "0.1.0",
"private": true,
"scripts": {
diff --git a/examples/browser/wallet-web-extension/LICENSE.md b/examples/browser/wallet-web-extension/LICENSE.md
deleted file mode 100644
index 95a0f2df38..0000000000
--- a/examples/browser/wallet-web-extension/LICENSE.md
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2016 Samuel Simões
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "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 NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS 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.
diff --git a/examples/browser/wallet-web-extension/README.md b/examples/browser/wallet-web-extension/README.md
index 1322bb3f40..ff4c222b58 100644
--- a/examples/browser/wallet-web-extension/README.md
+++ b/examples/browser/wallet-web-extension/README.md
@@ -1,8 +1,17 @@
-# AE-Wallet-Extension-POC
+# WebExtension-based wallet
-How to build and install:
+## Overview
+This is a sample wallet as an WebExtension. It works with æpp opened in a browser where it is installed.
-1. Do `npm install` after add your keyPair in src/background.js
-2. Build with `npm run build`
-3. Enable developer tools in chrome and load the `dist` folder using `Load unpacked`
-4. You are now all set to Rock 'n' Roll.
+### How it works
+1. Install this wallet to Chrome or Firefox
+2. Start the [sample contract æpp](../aepp), which will start on port `9001`
+3. Visit [localhost:9001](http://localhost:9001)
+4. This wallet should attempt to connect to the æpp
+
+## Installation and running in Google Chrome
+1. Install required dependencies with `npm install`
+2. Start the build server in watch mode `npm run serve`
+3. Open [chrome://extensions](chrome://extensions/)
+4. Enable "Developer mode" at the right top conner
+5. Press "Load unpacked" button and choose the `dist` folder
diff --git a/examples/browser/wallet-web-extension/babel.config.js b/examples/browser/wallet-web-extension/babel.config.js
new file mode 100644
index 0000000000..e9558405fd
--- /dev/null
+++ b/examples/browser/wallet-web-extension/babel.config.js
@@ -0,0 +1,5 @@
+module.exports = {
+ presets: [
+ '@vue/cli-plugin-babel/preset'
+ ]
+}
diff --git a/examples/browser/wallet-web-extension/package.json b/examples/browser/wallet-web-extension/package.json
index a4173a6cd5..f17cfd9901 100644
--- a/examples/browser/wallet-web-extension/package.json
+++ b/examples/browser/wallet-web-extension/package.json
@@ -1,23 +1,27 @@
{
- "name": "ae-wallet-extension-poc",
- "version": "0.0.1",
- "description": "Test for AEX 2",
+ "name": "wallet-web-extension",
+ "version": "0.1.0",
+ "private": true,
"scripts": {
- "build": "node utils/build.js",
- "start": "node utils/webserver.js"
+ "serve": "vue-cli-service build --mode development --watch",
+ "build": "vue-cli-service build"
+ },
+ "dependencies": {
+ "core-js": "^3.6.5",
+ "vue": "^2.6.11"
},
"devDependencies": {
- "clean-webpack-plugin": "^1.0.0",
- "copy-webpack-plugin": "^5.1.1",
- "css-loader": "2.1.0",
- "file-loader": "3.0.1",
- "fs-extra": "7.0.1",
- "html-loader": "0.5.5",
- "html-webpack-plugin": "3.2.0",
- "style-loader": "^0.23.1",
- "webpack": "4.28.4",
- "webpack-cli": "^3.2.1",
- "webpack-dev-server": "3.1.14",
- "write-file-webpack-plugin": "4.5.0"
- }
+ "@vue/cli-plugin-babel": "~4.5.15",
+ "@vue/cli-service": "~4.5.15",
+ "sass": "^1.26.5",
+ "sass-loader": "^8.0.2",
+ "vue-cli-plugin-browser-extension": "^0.25.2",
+ "vue-template-compiler": "^2.6.11"
+ },
+ "browserslist": [
+ "> 1%",
+ "last 2 versions",
+ "not dead",
+ "not ie 11"
+ ]
}
diff --git a/examples/browser/wallet-web-extension/public/browser-extension.html b/examples/browser/wallet-web-extension/public/browser-extension.html
new file mode 100644
index 0000000000..2dbc5259f0
--- /dev/null
+++ b/examples/browser/wallet-web-extension/public/browser-extension.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ <%= htmlWebpackPlugin.options.title %>
+
+
+
+
+
diff --git a/examples/browser/wallet-web-extension/src/img/icon-128.png b/examples/browser/wallet-web-extension/public/icons/128.png
similarity index 100%
rename from examples/browser/wallet-web-extension/src/img/icon-128.png
rename to examples/browser/wallet-web-extension/public/icons/128.png
diff --git a/examples/browser/wallet-web-extension/src/img/icon-34.png b/examples/browser/wallet-web-extension/public/icons/34.png
similarity index 100%
rename from examples/browser/wallet-web-extension/src/img/icon-34.png
rename to examples/browser/wallet-web-extension/public/icons/34.png
diff --git a/examples/browser/wallet-web-extension/src/Popup.vue b/examples/browser/wallet-web-extension/src/Popup.vue
new file mode 100644
index 0000000000..30eacae9a3
--- /dev/null
+++ b/examples/browser/wallet-web-extension/src/Popup.vue
@@ -0,0 +1,13 @@
+
+