Skip to content

Commit

Permalink
Protect the seed by refactoring the application as two independent pr…
Browse files Browse the repository at this point in the history
…ocesses running on a microkernel.
  • Loading branch information
Empowerful committed Aug 15, 2019
1 parent 4f483e1 commit 7837a77
Show file tree
Hide file tree
Showing 572 changed files with 14,195 additions and 11,385 deletions.
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
},
"rules": {
"camelcase": 0,
"no-undef": "error",
"no-unused-vars": "warn",
"generator-star-spacing": ["error", {"before": true, "after": true}],
"jest/no-disabled-tests": 1,
"jest/no-focused-tests": 2,
Expand Down
12 changes: 8 additions & 4 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"scripts": {
"beforeStart": [
"hooks": {
"before:init": [
"rm -rf packages/blockchain-wallet-v4-frontend/build",
"yarn manage:translations"
"yarn manage:translations",
"npx audit-ci --critical"
]
},
"git": {
"requireCleanWorkingDir": false,
"requireUpstream": false,
"_changelog": "changelog -t $(git describe --abbrev=0 --tags) -f -",
"changelog": "changelog -t $(git describe --abbrev=0 --tags) -f -",
"commitMessage": "chore(Release): v${version}",
"tagName": "v${version}",
"tagAnnotation": "Release v${version}",
Expand All @@ -19,5 +20,8 @@
"preRelease": true,
"releaseName": "v${version}",
"tokenRef": "RELEASE_IT_TOKEN"
},
"npm": {
"publish": false
}
}
13 changes: 8 additions & 5 deletions config/env/production.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
module.exports = {
ROOT_URL: 'https://blockchain.info',
API_DOMAIN: 'https://api.blockchain.info',
WEB_SOCKET_URL: 'wss://ws.blockchain.info',
COINIFY_URL: 'https://app-api.coinify.com',
COINIFY_PAYMENT_DOMAIN: 'https://pay.coinify.com',
COM_WALLET_APP: 'https://login.blockchain.com',
COM_ROOT: 'https://blockchain.com',
WALLET_HELPER_DOMAIN: 'https://wallet-helper.blockchain.info',
LEDGER_URL: 'https://manager.api.live.ledger.com',
LEDGER_SOCKET_URL: 'wss://api.ledgerwallet.com',
HORIZON_URL: 'https://horizon.stellar.org',
LEDGER_SOCKET_URL: 'wss://api.ledgerwallet.com',
LEDGER_URL: 'https://manager.api.live.ledger.com',
ROOT_URL: 'https://blockchain.info',
THE_PIT_URL: 'https://pit.blockchain.com',
WEB_SOCKET_URL: 'wss://ws.blockchain.info',
WALLET_HELPER_DOMAIN: 'https://wallet-helper.blockchain.info',
VERIFF_URL: 'https://magic.veriff.me'
}
15 changes: 9 additions & 6 deletions config/env/testnet.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module.exports = {
ROOT_URL: 'https://testnet.blockchain.info',
API_DOMAIN: 'https://api-testnet.blockchain.info',
WEB_SOCKET_URL: 'wss://ws.blockchain.info/testnet3',
WALLET_HELPER_DOMAIN: 'https://wallet-helper.blockchain.info',
LEDGER_URL: 'https://manager.api.live.ledger.com',
LEDGER_SOCKET_URL: 'wss://api.ledgerwallet.com',
COINIFY_URL: 'https://app-api.coinify.com',
COINIFY_PAYMENT_DOMAIN: 'https://pay.sandbox.coinify.com',
HORIZON_URL: 'https://horizon-testnet.stellar.org',
NETWORK_TYPE: 'testnet'
LEDGER_SOCKET_URL: 'wss://api.ledgerwallet.com',
LEDGER_URL: 'https://manager.api.live.ledger.com',
NETWORK_TYPE: 'testnet',
WALLET_HELPER_DOMAIN: 'https://wallet-helper.blockchain.info',
WEB_SOCKET_URL: 'wss://ws.blockchain.info/testnet3',
ROOT_URL: 'https://testnet.blockchain.info',
THE_PIT_URL: 'https://dev.blockchain.info'
}
70 changes: 55 additions & 15 deletions config/mocks/wallet-options-v4.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"web": {
"application": {
"analyticsSiteId": 2,
"enableDomainMigrationRedirects": true,
"environment": "dev",
"announcements": {
"lockbox": {},
Expand All @@ -12,14 +11,19 @@
"wallet": {}
}
},
"ads": {
"blacklist": ["LT", "LU", "UK", "US"],
"url": "https://games.bitcoin.com/slots?cma=20190619_blockchainwalletS&utm_source=blockchainwallet_S&utm_medium=banner&utm_campaign=20190619_blockchainwalletS"
},
"coins": {
"BTC": {
"availability": {
"send": true,
"request": true,
"lockbox": true,
"exchangeTo": true,
"exchangeFrom": true
"exchangeFrom": true,
"syncToPit": true
},
"coinCode": "BTC",
"coinTicker": "BTC",
Expand All @@ -45,7 +49,8 @@
"request": true,
"lockbox": true,
"exchangeTo": true,
"exchangeFrom": true
"exchangeFrom": true,
"syncToPit": true
},
"coinCode": "BCH",
"coinTicker": "BCH",
Expand All @@ -67,13 +72,40 @@
"txExplorerBaseUrl": "https://blockchain.com/bch/tx",
"txListAppRoute": "/bch/transactions"
},
"BSV": {
"availability": {
"send": false,
"request": false,
"lockbox": false,
"exchangeTo": false,
"exchangeFrom": true,
"syncToPit": false
},
"coinCode": "BSV",
"coinTicker": "BSV",
"colorCode": "bsv",
"displayName": "Bitcoin SV",
"config": {
"fees": {
"regular": 4,
"priority": 4
}
},
"hasLockboxSupport": false,
"icons": {
"default": "bsv"
},
"minConfirmations": 3,
"txExplorerBaseUrl": "https://blockchair.com/bitcoin-sv/transaction"
},
"ETH": {
"availability": {
"send": true,
"request": true,
"lockbox": true,
"exchangeTo": true,
"exchangeFrom": true
"exchangeFrom": true,
"syncToPit": true
},
"coinCode": "ETH",
"coinTicker": "ETH",
Expand All @@ -99,7 +131,8 @@
"request": true,
"lockbox": false,
"exchangeTo": true,
"exchangeFrom": true
"exchangeFrom": true,
"syncToPit": true
},
"coinCode": "PAX",
"coinTicker": "PAX",
Expand Down Expand Up @@ -127,7 +160,8 @@
"request": true,
"lockbox": true,
"exchangeTo": true,
"exchangeFrom": true
"exchangeFrom": true,
"syncToPit": true
},
"campaign": "sunriver",
"coinCode": "XLM",
Expand Down Expand Up @@ -233,13 +267,13 @@
"SI",
"ES",
"SE",
"CH"
"CH",
"US"
],
"config": {
"partnerId": 24,
"production": false,
"iSignThisDomain": "https://stage-coinify-verify.isignthis.com",
"coinifyPaymentDomain": "https://pay.coinify.com"
"iSignThisDomain": "https://stage-coinify-verify.isignthis.com"
}
},
"sfox": {
Expand Down Expand Up @@ -325,21 +359,27 @@
"apiKey": "b7a7c320c19ea3a8e276c8921bc3ff79ec064d2cd9d98ab969acc648246b4be5ab2379af704c5d3a3021c0ddf82b3e479590718847c1301e1a85331d2d2a8370",
"upperLimit": 750
}
},
"sift": {
"apiKey": "0ecd212038"
}
},
"ios": {},
"android": {}
},
"domains": {
"root": "https://blockchain.info",
"api": "https://api.blockchain.info",
"webSocket": "wss://ws.blockchain.info",
"walletHelper": "https://wallet-helper.blockchain.com",
"comWalletApp": "https://login.blockchain.com",
"coinify": "https://app-api.coinify.com",
"coinifyPaymentDomain": "https://pay.coinify.com",
"comRoot": "https://www.blockchain.com",
"comWalletApp": "https://login.blockchain.com",
"horizon": "https://horizon.stellar.org",
"ledger": "https://manager.api.live.ledger.com",
"ledgerSocket": "wss://api.ledgerwallet.com",
"horizon": "https://horizon.stellar.org",
"veriff": "https://magic.veriff.me"
"root": "https://blockchain.info",
"thePit": "https://pit.blockchain.com",
"veriff": "https://magic.veriff.me",
"walletHelper": "https://wallet-helper.blockchain.com",
"webSocket": "wss://ws.blockchain.info"
}
}
1 change: 0 additions & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const resolveRoot = relativePath => path.resolve(appDirectory, relativePath)
module.exports = {
appBuild: resolveRoot('lib'),
ciBuild: resolveRoot('dist'),
src: resolveRoot('packages/blockchain-wallet-v4-frontend/src'),
pkgJson: resolveRoot('package.json'),
envConfig: resolveRoot('config/env'),
sslConfig: resolveRoot('config/ssl')
Expand Down
44 changes: 27 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockchain-wallet-v4",
"version": "4.15.0",
"version": "4.20.4",
"license": "AGPL-3.0-or-later",
"private": true,
"author": {
Expand Down Expand Up @@ -63,17 +63,20 @@
"ci:compile": "yarn workspace blockchain-wallet-v4-frontend ci:compile",
"ci:coverage:components": "yarn workspace blockchain-info-components ci:coverage:components",
"ci:coverage:core": "yarn workspace blockchain-wallet-v4 ci:coverage:core",
"ci:coverage:frontend": "yarn workspace blockchain-wallet-v4-frontend ci:coverage:frontend",
"ci:coverage:main-process": "yarn workspace main-process ci:coverage:frontend",
"ci:coverage:security-process": "yarn workspace security-process ci:coverage:frontend",
"ci:coverage:report": "istanbul report --root ./coverage --dir ./coverage/ lcov && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"ci:lint": "prettier './packages/*/src/**/*.js' --loglevel error --write && eslint './packages/*/src/**/*.js' --fix && stylelint './packages/*/src/**/*.js'",
"ci:test:build": "yarn wsrun test:build --serial",
"ci:test:core:components": "yarn wsrun ci:test --serial --exclude-missing",
"ci:test:frontend": "yarn workspace blockchain-wallet-v4-frontend ci:test:frontend",
"ci:test:main-process": "yarn workspace main-process ci:test:frontend",
"ci:test:security-process": "yarn workspace security-process ci:test:frontend",
"clean": "cross-env yarn wsrun clean && rimraf build && rimraf coverage && rimraf dist && rimraf *.log && rimraf node_modules",
"coverage": "cross-env rimraf coverage && yarn wsrun coverage --fast-exit && istanbul report --root ./coverage --dir ./coverage/ text-summary html",
"coverage:components": "yarn workspace blockchain-info-components coverage",
"coverage:core": "yarn workspace blockchain-wallet-v4 coverage",
"coverage:frontend": "yarn workspace blockchain-wallet-v4-frontend coverage",
"coverage:main-process": "yarn workspace main-process coverage",
"coverage:security-process": "yarn workspace security-process coverage",
"debug:prod": "yarn workspace blockchain-wallet-v4-frontend debug:prod",
"fix": "cross-env yarn prettier && yarn lint:fix && yarn test:components:update && yarn test:frontend:update",
"link:resolved:paths": "yarn wsrun link:resolved:paths --exclude-missing",
Expand All @@ -82,17 +85,19 @@
"lint:core": "eslint './packages/blockchain-wallet-v4/src/**/*.js'",
"lint:css": "stylelint './packages/*/src/**/*.js'",
"lint:fix": "eslint './packages/*/src/**/*.js' --fix",
"lint:frontend": "eslint './packages/blockchain-wallet-v4-frontend/src/**/*.js'",
"lint:main-process": "eslint './packages/main-process/src/**/*.js'",
"lint:security-process": "eslint './packages/security-process/src/**/*.js'",
"manage:translations": "yarn workspace blockchain-wallet-v4-frontend manage:translations",
"prettier": "prettier './packages/*/src/**/*.js' --loglevel error --write",
"prettier:components": "prettier './packages/blockchain-info-components/src/**/*.js' --list-different --loglevel error --write",
"prettier:core": "prettier './packages/blockchain-wallet-v4/src/**/*.js' --list-different --loglevel error --write",
"prettier:frontend": "prettier './packages/blockchain-wallet-v4-frontend/src/**/*.js' --list-different --loglevel error --write",
"start": "yarn workspace blockchain-wallet-v4-frontend start:dev",
"start:dev": "yarn workspace blockchain-wallet-v4-frontend start:dev",
"start:prod": "yarn workspace blockchain-wallet-v4-frontend start:prod",
"start:staging": "yarn workspace blockchain-wallet-v4-frontend start:staging",
"start:testnet": "yarn workspace blockchain-wallet-v4-frontend start:testnet",
"prettier:main-process": "prettier './packages/main-process/src/**/*.js' --list-different --loglevel error --write",
"prettier:security-process": "prettier './packages/security-process/src/**/*.js' --list-different --loglevel error --write",
"start": "yarn start:dev",
"start:dev": "cross-env-shell NODE_ENV=development webpack-dev-server --config webpack.config.dev.js --progress --colors --watch --devtool cheap-module-source-map",
"start:prod": "cross-env-shell DISABLE_SSL=true NODE_ENV=production webpack-dev-server --config webpack.config.dev.js --progress --colors --watch --devtool cheap-module-source-map",
"start:staging": "cross-env-shell NODE_ENV=staging webpack-dev-server --config webpack.config.dev.js --progress --colors --watch --devtool cheap-module-source-map",
"start:testnet": "cross-env-shell NODE_ENV=testnet webpack-dev-server --config webpack.config.dev.js --progress --colors --watch --devtool cheap-module-source-map",
"storybook:build": "yarn workspace blockchain-info-components storybook:build",
"storybook:serve": "yarn workspace blockchain-info-components storybook:serve",
"storybook:deploy": "yarn workspace blockchain-info-components storybook:build && yarn workspace blockchain-info-components storybook:deploy",
Expand All @@ -104,10 +109,14 @@
"test:core": "yarn workspace blockchain-wallet-v4 test",
"test:core:debug": "yarn workspace blockchain-wallet-v4 test:debug",
"test:core:watch": "yarn workspace blockchain-wallet-v4 test:watch",
"test:frontend": "yarn workspace blockchain-wallet-v4-frontend test",
"test:frontend:debug": "yarn workspace blockchain-wallet-v4-frontend test:debug",
"test:frontend:update": "yarn workspace blockchain-wallet-v4-frontend test:update",
"test:frontend:watch": "yarn workspace blockchain-wallet-v4-frontend test:watch",
"test:main-process": "yarn workspace main-process test",
"test:main-process:debug": "yarn workspace main-process test:debug",
"test:main-process:update": "yarn workspace main-process test:update",
"test:main-process:watch": "yarn workspace main-process test:watch",
"test:security-process": "yarn workspace security-process test",
"test:security-process:debug": "yarn workspace security-process test:debug",
"test:security-process:update": "yarn workspace security-process test:update",
"test:security-process:watch": "yarn workspace security-process test:watch",
"release": "release-it"
},
"dependencies": {
Expand Down Expand Up @@ -166,7 +175,8 @@
"express": "4.16.4",
"file-loader": "3.0.1",
"generate-changelog": "1.7.1",
"html-webpack-plugin": "3.2.0",
"//": "See https://github.com/jantimon/html-webpack-plugin/pull/944",
"html-webpack-plugin": "git://github.com/umeboshi2/html-webpack-plugin.git#094c0062d634e5e60fc1073268cfcd49dc913d29",
"husky": "2.3.0",
"identity-obj-proxy": "3.0.0",
"istanbul": "github:Xesenix/istanbul",
Expand All @@ -184,7 +194,7 @@
"react-test-renderer": "16.8.6",
"redux-mock-store": "1.5.3",
"redux-saga-test-plan": "4.0.0-beta.3",
"release-it": "11.0.0",
"release-it": "12.3.0",
"rimraf": "2.6.3",
"staged-git-files": "1.2.0",
"standard": "12.0.1",
Expand Down
Loading

0 comments on commit 7837a77

Please sign in to comment.