1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
const connect = require('react-redux').connect
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const actions = require('./actions')
module.exports = connect(mapStateToProps)(EthStoreWarning)
inherits(EthStoreWarning, Component)
function EthStoreWarning () {
Component.call(this)
}
function mapStateToProps (state) {
return {
selectedAccount: state.metamask.selectedAccount,
}
}
EthStoreWarning.prototype.render = function () {
return (
h('.flex-column', {
key: 'ethWarning',
style: {
paddingTop: '25px',
marginRight: '30px',
marginLeft: '30px',
alignItems: 'center',
},
}, [
h('.warning', {
style: {
margin: '10px 10px 10px 10px',
},
},
`The MetaMask team would like to
remind you that MetaMask is currently in beta - so
don't store large
amounts of ether in MetaMask.
`),
h('i.fa.fa-exclamation-triangle.fa-4', {
style: {
fontSize: '152px',
color: '#AEAEAE',
textAlign: 'center',
},
}),
h('.flex-row', {
style: {
marginTop: '25px',
marginBottom: '10px',
},
}, [
h('input', {
type: 'checkbox',
onChange: this.toggleShowWarning.bind(this),
}),
h('.warning', {
style: {
fontSize: '11px',
},
}, 'Don\'t show me this message again'),
]),
h('.flex-row', {
style: {
width: '100%',
justifyContent: 'space-around',
},
}, [
h('button', {
onClick: this.toAccounts.bind(this),
},
'Continue to MetaMask'),
]),
])
)
}
EthStoreWarning.prototype.toggleShowWarning = function () {
this.props.dispatch(actions.agreeToEthWarning())
}
EthStoreWarning.prototype.toAccounts = function () {
this.props.dispatch(actions.showAccountDetail(this.props.account))
}
|