|
|
@ -66,6 +66,7 @@ PendingTx.prototype.render = function () { |
|
|
|
|
|
|
|
|
|
|
|
const balanceBn = hexToBn(balance) |
|
|
|
const balanceBn = hexToBn(balance) |
|
|
|
const insufficientBalance = balanceBn.lt(maxCost) |
|
|
|
const insufficientBalance = balanceBn.lt(maxCost) |
|
|
|
|
|
|
|
const buyDisabled = insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting |
|
|
|
|
|
|
|
|
|
|
|
this.inputs = [] |
|
|
|
this.inputs = [] |
|
|
|
|
|
|
|
|
|
|
@ -297,14 +298,6 @@ PendingTx.prototype.render = function () { |
|
|
|
margin: '14px 25px', |
|
|
|
margin: '14px 25px', |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, [ |
|
|
|
}, [ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insufficientBalance ? |
|
|
|
|
|
|
|
h('button.btn-green', { |
|
|
|
|
|
|
|
onClick: props.buyEth, |
|
|
|
|
|
|
|
}, 'Buy Ether') |
|
|
|
|
|
|
|
: null, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
h('button', { |
|
|
|
h('button', { |
|
|
|
onClick: (event) => { |
|
|
|
onClick: (event) => { |
|
|
|
this.resetGasFields() |
|
|
|
this.resetGasFields() |
|
|
@ -312,12 +305,13 @@ PendingTx.prototype.render = function () { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, 'Reset'), |
|
|
|
}, 'Reset'), |
|
|
|
|
|
|
|
|
|
|
|
// Accept Button
|
|
|
|
// Accept Button or Buy Button
|
|
|
|
|
|
|
|
insufficientBalance ? h('button.btn-green', { onClick: props.buyEth }, 'Buy Ether') : |
|
|
|
h('input.confirm.btn-green', { |
|
|
|
h('input.confirm.btn-green', { |
|
|
|
type: 'submit', |
|
|
|
type: 'submit', |
|
|
|
value: 'SUBMIT', |
|
|
|
value: 'SUBMIT', |
|
|
|
style: { marginLeft: '10px' }, |
|
|
|
style: { marginLeft: '10px' }, |
|
|
|
disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting, |
|
|
|
disabled: buyDisabled, |
|
|
|
}), |
|
|
|
}), |
|
|
|
|
|
|
|
|
|
|
|
h('button.cancel.btn-red', { |
|
|
|
h('button.cancel.btn-red', { |
|
|
|