Public node WASM, performance and fixes (#5734)

This commit is contained in:
Maciej Hirsz
2017-06-12 15:57:16 +02:00
committed by Arkadiy Paronyan
parent edea41d35e
commit b2a42f03eb
32 changed files with 739 additions and 129 deletions

View File

@@ -63,7 +63,8 @@
"author": "Parity Team <admin@parity.io>",
"version": "1.0.0",
"visible": false,
"secure": true
"secure": true,
"onlyPersonal": true
},
{
"id": "0xae74ad174b95cdbd01c88ac5b73a296d33e9088fc2a200e76bcedf3a94a7815d",
@@ -94,6 +95,7 @@
"version": "1.0.0",
"visible": true,
"skipBuild": true,
"skipHistory": true
"skipHistory": true,
"onlyPersonal": true
}
]

View File

@@ -34,10 +34,11 @@ import styles from './dapps.css';
class Dapps extends Component {
static contextTypes = {
api: PropTypes.object.isRequired
}
};
static propTypes = {
accounts: PropTypes.object.isRequired
accounts: PropTypes.object.isRequired,
availability: PropTypes.string.isRequired
};
store = DappsStore.get(this.context.api);
@@ -133,6 +134,10 @@ class Dapps extends Component {
}
renderApp = (app) => {
if (app.onlyPersonal && this.props.availability !== 'personal') {
return null;
}
return (
<DappCard
app={ app }
@@ -156,6 +161,7 @@ class Dapps extends Component {
function mapStateToProps (state) {
const { accounts } = state.personal;
const { availability = 'unknown' } = state.nodeStatus.nodeKind || {};
/**
* Do not show the Wallet Accounts in the Dapps
@@ -165,7 +171,8 @@ function mapStateToProps (state) {
const _accounts = omitBy(accounts, (account) => account.wallet);
return {
accounts: _accounts
accounts: _accounts,
availability
};
}