1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 11:46:13 +02:00
metamask-extension/ui/app/components/pending-personal-msg.js

48 lines
942 B
JavaScript
Raw Normal View History

2017-02-23 01:23:13 +01:00
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const PendingTxDetails = require('./pending-personal-msg-details')
2017-02-23 01:23:13 +01:00
module.exports = PendingMsg
inherits(PendingMsg, Component)
function PendingMsg () {
Component.call(this)
}
PendingMsg.prototype.render = function () {
var state = this.props
var msgData = state.txData
return (
h('div', {
key: msgData.id,
}, [
// header
h('h3', {
style: {
fontWeight: 'bold',
textAlign: 'center',
},
}, 'Sign Message'),
// message details
h(PendingTxDetails, state),
// sign + cancel
h('.flex-row.flex-space-around', [
h('button', {
2017-02-24 01:00:43 +01:00
onClick: state.cancelPersonalMessage,
2017-02-23 01:23:13 +01:00
}, 'Cancel'),
h('button', {
onClick: state.signPersonalMessage,
2017-02-23 01:23:13 +01:00
}, 'Sign'),
]),
])
)
}