Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
socket.on('start game', function() {
console.log('START GAME');
gameState = game.startBoard(gameState);
console.log('gameState.board:', m.get(gameState, 'board'));
io.emit('start game', m.toJs(gameState));
// io.emit('start game', gameState);
});
attestations => toJs(attestations)
)
export const snapshot = (state) => ({
uport: toJs(state.uport),
hdwallet: toJs(state.hdwallet)
})
export const snapshot = (state) => ({
uport: toJs(state.uport),
hdwallet: toJs(state.hdwallet)
})
identities => toJs(identities),
)
claims => toJs(claims),
)
const mapStateToProps = (state, ownProps) => {
return {
address: ownProps.verification.sub,
issuer:
toJs(get(externalIdentities(state), ownProps.verification.iss)) || {},
}
}
const mapStateToProps = (state, ownProps) => {
return {
address: ownProps.verification.sub,
issuer: toJs(get(externalIdentities(state), ownProps.verification.iss)) || {},
}
}
const mapStateToProps = (state, ownProps) => {
const userData = toJs(ownClaims(state)) || {}
return {
...ownProps,
avatar: typeof state.myInfo.changed.avatar !== 'undefined' ? state.myInfo.changed.avatar : userData.avatar,
name: typeof state.myInfo.changed.name !== 'undefined' ? state.myInfo.changed.name : userData.name,
email: typeof state.myInfo.changed.email !== 'undefined' ? state.myInfo.changed.email : userData.email,
country: typeof state.myInfo.changed.country !== 'undefined' ? state.myInfo.changed.country : userData.country,
phone: typeof state.myInfo.changed.phone !== 'undefined' ? state.myInfo.changed.phone : userData.phone,
userData,
address: currentAddress(state),
shareToken: state.myInfo.shareToken
}
}
export const mapDispatchToProps = (dispatch) => {
render () {
let state = mori.toJs(this.props.state)
let icon = state.icon
let message = state.message
let error = (icon === 'error')
return r.div({classSet: {setup_page: true, error}}, [
r.div({className: 'setup_widget'}, [
r.div({className: 'throbber_loader'}, [
r(Icon, {icon})
]),
r.div({className: 'setup_message'}, message)
])
])
}
}