Fold submit and buy ether into one button slot

feature/default_network_editable
Kevin Serrano 7 years ago
parent 34e7bb5015
commit 3a87a30912
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1
  1. 14
      ui/app/components/pending-tx.js

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

Loading…
Cancel
Save