|
|
@ -1,10 +1,18 @@ |
|
|
|
const Component = require('react').Component |
|
|
|
const Component = require('react').Component |
|
|
|
|
|
|
|
const connect = require('react-redux').connect |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const h = require('react-hyperscript') |
|
|
|
const inherits = require('util').inherits |
|
|
|
const inherits = require('util').inherits |
|
|
|
const PendingTxDetails = require('./pending-tx-details') |
|
|
|
const PendingTxDetails = require('./pending-tx-details') |
|
|
|
const extend = require('xtend') |
|
|
|
const extend = require('xtend') |
|
|
|
|
|
|
|
const actions = require('../actions') |
|
|
|
|
|
|
|
|
|
|
|
module.exports = PendingTx |
|
|
|
module.exports = connect(mapStateToProps)(PendingTx) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inherits(PendingTx, Component) |
|
|
|
inherits(PendingTx, Component) |
|
|
|
function PendingTx () { |
|
|
|
function PendingTx () { |
|
|
@ -73,7 +81,13 @@ PendingTx.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
h('button.confirm.btn-green', { |
|
|
|
h('button.confirm.btn-green', { |
|
|
|
disabled: props.insufficientBalance, |
|
|
|
disabled: props.insufficientBalance, |
|
|
|
onClick: props.sendTransaction, |
|
|
|
onClick: (txData, event) => { |
|
|
|
|
|
|
|
if (this.refs.details.verifyGasParams()) { |
|
|
|
|
|
|
|
props.sendTransaction(txData, event) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, 'Accept'), |
|
|
|
}, 'Accept'), |
|
|
|
|
|
|
|
|
|
|
|
h('button.cancel.btn-red', { |
|
|
|
h('button.cancel.btn-red', { |
|
|
|