Skip to content

Commit

Permalink
Merge pull request #41 from Volentix/development
Browse files Browse the repository at this point in the history
Merge Dev into Master
  • Loading branch information
gluneau authored Nov 28, 2019
2 parents 028bd44 + 996994c commit f12c67c
Show file tree
Hide file tree
Showing 37 changed files with 7,212 additions and 1,605 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To know more about Verto architecture, [please read this guide.](https://vertoho

To install Verto you will need to have the following installed on your system:

1. **NPM:** v6.4.1
1. **Yarn:**
2. **Node:** v10.15.0
3. **Quasar:** v1.0.0 [Install Quasar Docs](https://quasar.dev/quasar-cli/installation).

Expand All @@ -54,12 +54,12 @@ If you are looking to make contributions, you will need to fork the repository.

Once you have a copy locally, cd into the cloned directory:
```
cd verto
cd verto/app
```

No install the dependancies:
```
npm i
yarn
```

Thats it! Happy hacking!
Expand All @@ -76,6 +76,14 @@ Only a browser is required to run on web.
quasar dev
```

### Tauri

No additional tooling is required to run Verto as an electron app.

```
quasar dev -m tauri
```

### Electron

No additional tooling is required to run Verto as an electron app.
Expand All @@ -102,7 +110,7 @@ quasar dev -m ios

## Maintainers

[rhys@volentixlabs.com](https://github.com/rhys@volentixlabs.com)
[gregory@volentixlabs.com](mailto:gregory@volentixlabs.com)

## Contribute

Expand Down
30 changes: 16 additions & 14 deletions app/.babelrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": "current"
"plugins": ["@babel/plugin-syntax-dynamic-import"],
"env": {
"test": {
"plugins": ["dynamic-import-node"],
"presets": [
[
"@babel/preset-env",
{
"modules": "commonjs",
"targets": {
"node": "current"
}
}
}
]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"babel-plugin-dynamic-import-node"
]
]
]
}
}
}
4 changes: 2 additions & 2 deletions app/.quasar.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"ENV_DEV": "Development",
"mainnet": {
"CHAIN_ID": "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",
"EOS_HISTORYAPI": "https://public.eosinfra.io,https://public.eosinfra.io,https://public.eosinfra.io,https://eos.eoscafeblock.com,https://eos.greymass.com:443",
"EOS_HISTORYAPI": "https://eos.greymass.com:443,https://api.eossweden.org,https://eos.eoscafeblock.com,https://api.eossweden.org,https://api.eossweden.org",
"DEMUX_API": "https://demux.vlabs.ninja:4000",
"LEDGER_ACCOUNT_NAME": "volentixfrst",
"CROWDFUND_URL": "https://volentix-cf.tekstackapps.com/",
Expand Down Expand Up @@ -34,7 +34,7 @@
"ENV_PROD": "Production",
"mainnet": {
"CHAIN_ID": "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906",
"EOS_HISTORYAPI": "https://public.eosinfra.io,https://public.eosinfra.io,https://public.eosinfra.io,https://eos.eoscafeblock.com,https://eos.greymass.com:443",
"EOS_HISTORYAPI": "https://api.eossweden.org,https://api.eossweden.org,https://api.eossweden.org,https://eos.eoscafeblock.com,https://eos.greymass.com:443",
"DEMUX_API": "https://demux.vlabs.ninja:4000",
"LEDGER_ACCOUNT_NAME": "volentixfrst",
"CROWDFUND_URL": "https://volentix-cf.tekstackapps.com/",
Expand Down
15 changes: 14 additions & 1 deletion app/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
const fs = require('fs-extra')
let extend = undefined

/**
* The .babelrc file has been created to assist Jest for transpiling.
* You should keep your application's babel rules in this file.
*/

if (fs.existsSync('./.babelrc')) {
extend = './.babelrc'
}

module.exports = {
presets: [
'@quasar/babel-preset-app'
]
],
extends: extend
}
64 changes: 64 additions & 0 deletions app/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
module.exports = {
globals: {
__DEV__: true
},
setupFilesAfterEnv: [
'<rootDir>/test/jest/jest.setup.js'
],
// noStackTrace: true,
// bail: true,
// cache: false,
// verbose: true,
// watch: true,
collectCoverage: true,
coverageDirectory: '<rootDir>/test/jest/coverage',
collectCoverageFrom: [
'<rootDir>/src/**/*.vue',
'<rootDir>/src/**/*.js',
'<rootDir>/src/**/*.ts',
'<rootDir>/src/**/*.jsx'
],
coverageThreshold: {
global: {
// branches: 50,
// functions: 50,
// lines: 50,
// statements: 50
}
},
testMatch: [
'<rootDir>/test/jest/__tests__/**/*.spec.js',
'<rootDir>/test/jest/__tests__/**/*.test.js',
'<rootDir>/src/**/__tests__/*_jest.spec.js'
],
moduleFileExtensions: [
'vue',
'js',
'jsx',
'json',
'ts',
'tsx'
],
moduleNameMapper: {
'^vue$': '<rootDir>/node_modules/vue/dist/vue.common.js',
'^test-utils$': '<rootDir>/node_modules/@vue/test-utils/dist/vue-test-utils.js',
'^quasar$': '<rootDir>/node_modules/quasar/dist/quasar.common.js',
'^~/(.*)$': '<rootDir>/$1',
'^src/(.*)$': '<rootDir>/src/$1',
'.*css$': '<rootDir>/test/jest/utils/stub.css'
},
transform: {
'.*\\.vue$': 'vue-jest',
'.*\\.js$': 'babel-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
// use these if NPM is being flaky
// '.*\\.vue$': '<rootDir>/node_modules/@quasar/quasar-app-extension-testing-unit-jest/node_modules/vue-jest',
// '.*\\.js$': '<rootDir>/node_modules/@quasar/quasar-app-extension-testing-unit-jest/node_modules/babel-jest'
},
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!quasar/lang)'
],
snapshotSerializers: [
'<rootDir>/node_modules/jest-serializer-vue'
]
}
31 changes: 25 additions & 6 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verto",
"version": "0.9.0",
"version": "0.9.1",
"description": "A multi-currency crypto wallet with initial support for EOS & VTX",
"productName": "Verto",
"cordovaId": "org.cordova.verto",
Expand Down Expand Up @@ -29,31 +29,50 @@
"deploy-dev": "aws s3 sync dist/pwa/ s3://verto-dev",
"deploy-prod": "aws s3 sync dist/pwa/ s3://verto-prod",
"lint": "./node_modules/eslint/bin/eslint.js --fix --ext .js,.vue src",
"test": "echo \"No test specified\" && exit 0"
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
"test:unit": "jest --updateSnapshot",
"test:unit:coverage": "jest --coverage",
"test:unit:watch": "jest --watch",
"test:unit:watchAll": "jest --watchAll",
"serve:test:coverage": "quasar serve test/jest/coverage/lcov-report/ --port 8788",
"concurrently:dev:jest": "concurrently \"quasar dev\" \"jest --watch\"",
"serve:test:lighthouse": "quasar serve test/lighthouse/reports/ --port 8789",
"audit:snyk": "snyk test --json > ./test/audits/snyk.json",
"audit:node_modules": "yarn audit --json > ./test/audits/node_modules_audit.json",
"audit:licenses": "nlf --summary detail > ./test/audits/licenses.txt",
"audit:lighthouse": "lighthouse http://localhost:3000 view --output-path=./test/lighthouse/reports/index.html --config-path=./test/lighthouse/configs/full-config.js"
},
"dependencies": {
"@chenfengyuan/vue-countdown": "^1.1.2",
"@chenfengyuan/vue-qrcode": "^1.0.0",
"@quasar/extras": "^1.2.0",
"@quasar/quasar-app-extension-qenv": "^1.0.0-beta.1",
"@quasar/extras": "^1.3.2",
"@quasar/quasar-app-extension-qenv": "^1.0.0-beta.2",
"axios": "^0.19.0",
"babel-loader": "^8.0.6",
"clipboard-polyfill": "^2.8.0",
"electron-log": "^3.0.5",
"electron-updater": "^4.0.6",
"eosjs": "^16.0.9",
"eosjs-ecc": "4.0.4",
"file-saver": "^2.0.1",
"fs-web": "^1.0.1",
"quasar": "^1.0.5",
"quasar": "^1.2.5",
"sjcl": "^1.0.8",
"ual-ledger": "^0.1.3",
"volentix-ledger": "^0.2.71",
"quasar-app-extension-ual-vuejs-renderer-ae": "^0.1.2",
"vue-filter-number-format": "^1.0.3",
"vue-i18n": "^8.11.1",
"vue-template-compiler": "^2.6.10",
"vuelidate": "^0.7.4"
},
"devDependencies": {
"@quasar/app": "^1.0.4",
"@quasar/app": "^1.2.2",
"@quasar/quasar-app-extension-testing": "^1.0.0",
"@quasar/quasar-app-extension-testing-quality": "^1.0.0-beta.8",
"@quasar/quasar-app-extension-testing-security": "^1.0.0-alpha.8",
"@quasar/quasar-app-extension-testing-security-antivuln": "^1.0.0-alpha.2",
"@quasar/quasar-app-extension-testing-unit-jest": "^1.0.0",
"@vue/eslint-config-standard": "^4.0.0",
"babel-eslint": "^10.0.1",
"devtron": "1.4.0",
Expand Down
3 changes: 3 additions & 0 deletions app/quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ module.exports = function (ctx) {
// all: true, // --- includes everything; for dev only!

components: [
'QBadge',
'QSlider',
'QToggle',
'QAvatar',
'QInnerLoading',
'QBtn',
Expand Down
29 changes: 28 additions & 1 deletion app/quasar.extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,32 @@
"@quasar/qenv": {
"common_root_object": "none",
"add_qenv_to_gitignore": false
}
},
"ual-vuejs-renderer-ae": {},
"@quasar/testing": {
"harnesses": [
"unit-jest",
"quality",
"security",
"security-antivuln"
]
},
"@quasar/testing-unit-jest": {
"babel": "babelrc",
"options": [
"scripts"
]
},
"@quasar/testing-quality": {
"options": [
"scripts"
]
},
"@quasar/testing-security": {
"options": [
"zap_local"
],
"zapbrowser": "Chrome"
},
"@quasar/testing-security-antivuln": {}
}
5 changes: 5 additions & 0 deletions app/quasar.testing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"unit-jest": {
"runnerCommand": "jest"
}
}
16 changes: 8 additions & 8 deletions app/src-pwa/register-service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@ register(process.env.SERVICE_WORKER_FILE, {
// registrationOptions: { scope: './' },

ready () {
console.log('App is being served from cache by a service worker.')
// console.log('App is being served from cache by a service worker.')
},

registered (registration) {
console.log('Service worker has been registered.')
// console.log('Service worker has been registered.')
},

cached (registration) {
console.log('Content has been cached for offline use.')
// console.log('Content has been cached for offline use.')
},

updatefound (registration) {
console.log('New content is downloading.')
// console.log('New content is downloading.')
},

updated (registration) {
console.log('New content is available; please refresh.')
// console.log('New content is available; please refresh.')
},

offline () {
console.log('No internet connection found. App is running in offline mode.')
// console.log('No internet connection found. App is running in offline mode.')
},

error (err) {
console.error('Error during service worker registration:', err)
error () {
// console.error('Error during service worker registration:', err)
}
})
8 changes: 4 additions & 4 deletions app/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@
"CreateWalletOptions": {
"header": "Verto Wallets",
"create_account": "Create A New Account",
"add_account": "Import an Existing Account",
"ledger_account": "Ledger",
"eos_account": "EOS",
"add_account": "Import Existing EOS Keys",
"ledger_account": "Public Key",
"eos_account": "Private Key with account only",
"create_options": "Create Options",
"write_it_down": "write the private key down",
"save_to_file": "save the private key encrypted",
"create_ledger": "Ledger Options"
"create_ledger": "EOS Key Options"
},
"SaveToFile": {
"give_wallet_password": "Encryption Password",
Expand Down
2 changes: 1 addition & 1 deletion app/src/index.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="<%= htmlWebpackPlugin.options.productDescription %>">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova) { %>, viewport-fit=cover<% } %>">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">

<link rel="icon" href="statics/quasar-logo.png" type="image/x-icon">
<link rel="icon" type="image/png" sizes="32x32" href="statics/icons/favicon-32x32.png">
Expand Down
9 changes: 3 additions & 6 deletions app/src/pages/Exchange/CoinSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,7 @@ export default {
this.orderStatus()
})
.catch((err) => {
console.log(err)
userError('There was a problem posting the order')
userError('There was a problem posting the order', err)
})
},
getPairs () {
Expand Down Expand Up @@ -645,8 +644,7 @@ export default {
self.destinationCoinUnfilter = self.destinationCoinOptions
})
.catch((err) => {
console.log(err)
userError('There was a problem getting the destination coins')
userError('There was a problem getting the destination coins', err)
})
},
getRate () {
Expand All @@ -661,8 +659,7 @@ export default {
self.rateData = response.data.data
})
.catch((err) => {
console.log(err)
userError('There was a problem getting the rate data')
userError('There was a problem getting the rate data', err)
})
}
}
Expand Down
Loading

0 comments on commit f12c67c

Please sign in to comment.