Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into onchain-invites
Browse files Browse the repository at this point in the history
* master:
  Use Foreman to be able to run 'yarn dev' from root
  Update dependencies
  Remove unnecessary code
  Move svgr to devDependencies
  Make transaction confirm address not truncated
  Address PR comments
  Update apps management UX
  Use timeline APIs for apps updates
  More styling on Trusted UI
  Apply update to installed app
  Add support for managing multiple app versions
  More styling changes
  Update to erebos v0.7
  some more design reviews
  Trusted UI Styles
  • Loading branch information
avclarke committed Apr 3, 2019
2 parents e50a662 + 37dd6f6 commit 87bbe3b
Show file tree
Hide file tree
Showing 127 changed files with 5,930 additions and 48,805 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ flow-typed
/packages/*/lib
/packages/*/.flowconfig
/packages/*/cjs
/packages/launcher/src/assets/svgs/*.svg
/packages/smart-contracts/build
dist/
*.log
.DS_Store
Expand Down
2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
daemon: yarn start:daemon
launcher: yarn start:launcher
14 changes: 7 additions & 7 deletions applications/onyx-stats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@
"build:app-skip": "webpack --mode production"
},
"dependencies": {
"@babel/runtime": "^7.3.4",
"@babel/runtime": "^7.4.2",
"@mainframe/sdk": "*",
"react": "^16.8.3",
"react-art": "^16.8.3",
"react-dom": "^16.8.3",
"react": "^16.8.5",
"react-art": "^16.8.5",
"react-dom": "^16.8.5",
"react-native-web": "^0.10.0",
"recharts": "^1.5.0",
"web3": "^1.0.0-beta.36"
},
"devDependencies": {
"babel-loader": "^8.0.4",
"babel-plugin-inline-react-svg": "^1.0.1",
"css-loader": "^2.1.0",
"flow-bin": "^0.93.0",
"css-loader": "^2.1.1",
"flow-bin": "^0.95.1",
"html-webpack-plugin": "^3.2.0",
"style-loader": "^0.23.0",
"url-loader": "^1.1.1",
"webpack": "^4.29.6",
"webpack-cli": "^3.1.2"
"webpack-cli": "^3.3.0"
}
}
10 changes: 5 additions & 5 deletions applications/payments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"dependencies": {
"@mainframe/eth": "*",
"@mainframe/sdk": "*",
"react": "^16.8.3",
"react-art": "^16.8.3",
"react-dom": "^16.8.3",
"react": "^16.8.5",
"react-art": "^16.8.5",
"react-dom": "^16.8.5",
"react-native-web": "^0.10.0",
"react-scripts": "2.1.5",
"react-scripts": "2.1.8",
"web3": "1.0.0-beta.36"
},
"devDependencies": {
"flow-bin": "^0.93.0"
"flow-bin": "^0.95.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
1 change: 0 additions & 1 deletion fixtures/test-app-manifest.json

This file was deleted.

27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,35 @@
"test:types-ci": "flow check --max-workers 1 --merge-timeout 0",
"test": "yarn run lint && yarn run test:types && yarn run test:unit",
"build": "lerna run build && lerna run build:sdk",
"start": "yarn run build && yarn run test"
"start": "yarn run build && yarn run test",
"start:daemon": "./packages/cli/bin/run daemon:stop && ./packages/cli/bin/run daemon:start",
"start:launcher": "cd packages/launcher && yarn dev",
"dev": "nf start"
},
"devDependencies": {
"@babel/cli": "^7.1.2",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-class-properties": "^7.3.4",
"@babel/plugin-proposal-object-rest-spread": "^7.3.4",
"@babel/plugin-transform-runtime": "^7.3.4",
"@babel/preset-env": "^7.3.4",
"@babel/core": "^7.4.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/plugin-proposal-object-rest-spread": "^7.4.0",
"@babel/plugin-transform-runtime": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@svgr/cli": "^4.1.0",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"babel-jest": "^24.5.0",
"cross-env": "^5.2.0",
"del-cli": "^1.1.0",
"electron-webpack": "^2.6.2",
"eslint": "^5.14.1",
"eslint-config-mainframe": "^3.0.0",
"flow-bin": "^0.93.0",
"eslint": "^5.15.3",
"eslint-config-mainframe": "^3.2.0",
"flow-bin": "^0.95.1",
"flow-copy-source": "^2.0.1",
"flow-remove-types": "^1.2.3",
"flow-typed": "^2.4.0",
"jest": "^24.1.0",
"foreman": "^3.0.1",
"jest": "^24.5.0",
"jest-junit": "^6.3.0",
"lerna": "^3.13.1",
"prettier": "^1.14.3"
Expand Down
10 changes: 5 additions & 5 deletions packages/app-manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
},
"dependencies": {
"@mainframe/data-types": "^0.2.0",
"@mainframe/secure-file": "^0.1.3",
"@mainframe/secure-file": "^0.2.0",
"@mainframe/utils-base64": "^0.1.1",
"es6-error": "^4.1.1",
"fastest-validator": "^0.6.13",
"semver": "^5.5.1"
"fastest-validator": "^0.6.17",
"semver": "^6.0.0"
},
"devDependencies": {
"@mainframe/app-permissions": "*",
"@mainframe/utils-crypto": "^0.3.0",
"flow-bin": "^0.93.0"
"@mainframe/utils-crypto": "^0.4.0",
"flow-bin": "^0.95.1"
}
}
2 changes: 1 addition & 1 deletion packages/app-permissions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"test:types": "flow check"
},
"devDependencies": {
"flow-bin": "^0.93.0"
"flow-bin": "^0.95.1"
}
}
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
"@mainframe/client": "^0.2.0",
"@mainframe/config": "^0.2.0",
"@mainframe/toolbox": "^0.2.0",
"@oclif/command": "^1.5.11",
"@oclif/config": "^1.12.8",
"@oclif/command": "^1.5.12",
"@oclif/config": "^1.12.11",
"@oclif/plugin-help": "^2.1.2",
"cli-table": "^0.3.1",
"get-port": "^4.0.0",
"get-port": "^4.2.0",
"graphql": "^14.1.1",
"inquirer": "^6.2.1",
"micro": "^9.3.3",
"rxjs": "^6.3.3"
},
"devDependencies": {
"@oclif/dev-cli": "^1.21.2",
"@oclif/dev-cli": "^1.21.3",
"del-cli": "^1.1.0",
"flow-bin": "^0.93.0"
"flow-bin": "^0.95.1"
}
}
6 changes: 3 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
"test:types": "flow check"
},
"dependencies": {
"@mainframe/rpc-ipc": "^0.2.3",
"@mainframe/rpc-ipc": "^0.3.0",
"graphql": "^14.1.1",
"rxjs": "^6.3.3"
},
"devDependencies": {
"@mainframe/app-manifest": "^0.2.0",
"@mainframe/app-permissions": "^0.2.0",
"@mainframe/rpc-stream": "^0.2.3",
"@mainframe/rpc-stream": "^0.3.0",
"@mainframe/utils-id": "^0.1.0",
"flow-bin": "^0.93.0"
"flow-bin": "^0.95.1"
}
}
4 changes: 2 additions & 2 deletions packages/client/src/types.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import type { SignFeedDigestFunc } from '@erebos/api-bzz-base'
import type { SignBytesFunc } from '@erebos/api-bzz-base'
import type { ManifestData, PartialManifestData } from '@mainframe/app-manifest'
import type {
PermissionCheckResult,
Expand Down Expand Up @@ -77,7 +77,7 @@ export type ContextStorageSettings = {
encryptionKey: Buffer,
contentHash: ?string,
feedHash: ?string,
signFeedDigest: SignFeedDigestFunc,
signBytes: SignBytesFunc,
manifestHash?: string,
}

Expand Down
6 changes: 3 additions & 3 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"dependencies": {
"@mainframe/data-types": "^0.2.0",
"@mainframe/utils-id": "^0.1.0",
"conf": "^2.0.0",
"env-paths": "^2.0.0",
"conf": "^3.0.0",
"env-paths": "^2.1.0",
"fs-extra": "^7.0.0"
},
"devDependencies": {
"flow-bin": "^0.93.0"
"flow-bin": "^0.95.1"
}
}
42 changes: 22 additions & 20 deletions packages/daemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,38 @@
"postpublish": "del-cli oclif.manifest.json"
},
"dependencies": {
"@babel/polyfill": "^7.2.5",
"@erebos/api-bzz-node": "^0.6.3",
"@erebos/api-pss": "^0.6.3",
"@erebos/hex": "^0.5.4",
"@erebos/keccak256": "^0.6.0",
"@erebos/secp256k1": "^0.6.0",
"@ledgerhq/hw-app-eth": "^4.24.0",
"@ledgerhq/hw-transport-node-hid": "^4.24.0",
"@babel/polyfill": "^7.4.0",
"@erebos/api-bzz-base": "^0.7.1",
"@erebos/api-bzz-node": "^0.7.0",
"@erebos/api-pss": "^0.7.0",
"@erebos/hex": "^0.7.0",
"@erebos/keccak256": "^0.7.0",
"@erebos/secp256k1": "^0.7.0",
"@erebos/timeline": "^0.7.0",
"@ledgerhq/hw-app-eth": "^4.48.0",
"@ledgerhq/hw-transport-node-hid": "^4.48.0",
"@mainframe/app-manifest": "^0.2.0",
"@mainframe/app-permissions": "^0.2.0",
"@mainframe/client": "^0.2.0",
"@mainframe/config": "^0.2.0",
"@mainframe/data-types": "^0.2.0",
"@mainframe/eth": "^0.2.1",
"@mainframe/rpc-error": "^0.3.0",
"@mainframe/rpc-handler": "^0.2.1",
"@mainframe/rpc-stream": "^0.2.4",
"@mainframe/rpc-ws-node": "^0.2.3",
"@mainframe/secure-file": "^0.1.3",
"@mainframe/rpc-error": "^0.4.0",
"@mainframe/rpc-handler": "^0.3.0",
"@mainframe/rpc-stream": "^0.3.0",
"@mainframe/rpc-ws-node": "^0.3.0",
"@mainframe/secure-file": "^0.2.0",
"@mainframe/utils-base64": "^0.1.0",
"@mainframe/utils-crypto": "^0.3.0",
"@mainframe/utils-crypto": "^0.4.0",
"@mainframe/utils-hex": "^0.1.1",
"@mainframe/utils-id": "^0.1.0",
"@oclif/command": "^1.5.11",
"@oclif/config": "^1.12.8",
"@oclif/command": "^1.5.12",
"@oclif/config": "^1.12.11",
"@oclif/plugin-help": "^2.1.2",
"bip39": "^2.5.0",
"bn": "^1.0.3",
"debug": "^4.0.1",
"eth-sig-util": "^2.1.0",
"eth-sig-util": "^2.1.2",
"ethereumjs-tx": "^1.3.7",
"ethereumjs-util": "^6.1.0",
"ethereumjs-wallet": "^0.6.2",
Expand All @@ -71,13 +73,13 @@
"multibase": "^0.6.0",
"oboe": "^2.1.4",
"rxjs": "^6.3.3",
"web3-providers-ws": "^1.0.0-beta.37",
"semver": "^6.0.0",
"web3-utils": "^1.0.0-beta.36"
},
"devDependencies": {
"@oclif/dev-cli": "^1.21.2",
"@oclif/dev-cli": "^1.21.3",
"babel-plugin-inline-json-import": "^0.3.2",
"del-cli": "^1.1.0",
"flow-bin": "^0.93.0"
"flow-bin": "^0.95.1"
}
}
57 changes: 30 additions & 27 deletions packages/daemon/src/app/AbstractApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ import { idType, type ID, uniqueID } from '@mainframe/utils-id'

import type Session from './Session'

const getDefaultSettings = () => {
return {
approvedContacts: {},
permissionsSettings: {
grants: {
WEB_REQUEST: {
denied: [],
granted: [],
},
},
permissionsChecked: false,
},
storageSettings: {
feedHash: undefined,
feedKey: createKeyPair().getPrivate('hex'),
encryptionKey: encodeBase64(createSecretStreamKey()),
},
walletSettings: {
defaultEthAccount: null,
},
}
}

export type WalletSettings = {
defaultEthAccount: ?string,
}
Expand Down Expand Up @@ -79,40 +102,20 @@ export default class AbstractApp {
return Object.keys(this._settings).map(idType)
}

// User settings

hasUser(userID: ID): boolean {
return this._settings[userID] != null
}

removeUser(userID: ID) {
delete this._settings[userID]
}

// Settings

getDefaultSettings = () => {
return {
approvedContacts: {},
permissionsSettings: {
grants: {
WEB_REQUEST: {
denied: [],
granted: [],
},
},
permissionsChecked: false,
},
storageSettings: {
feedHash: undefined,
feedKey: createKeyPair().getPrivate('hex'),
encryptionKey: encodeBase64(createSecretStreamKey()),
},
walletSettings: {
defaultEthAccount: null,
},
}
}

getSettings(userID: ID | string): AppUserSettings {
return (
this._settings[idType(userID)] ||
JSON.parse(JSON.stringify(this.getDefaultSettings()))
)
return this._settings[idType(userID)] || getDefaultSettings()
}

setSettings(userID: ID, settings: AppUserSettings): void {
Expand Down
Loading

0 comments on commit 87bbe3b

Please sign in to comment.