1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

[WIP] Isolate form logic from rest of confirmation UI

This commit is contained in:
sdtsui 2017-07-29 20:55:55 -07:00
parent 8ace4710ff
commit 35ff4c195c

View File

@ -75,11 +75,8 @@ PendingTx.prototype.render = function () {
key: txMeta.id,
}, [
h('form#pending-tx-form', {
onSubmit: this.onSubmit.bind(this),
h('div', {
}, [
// tx info
h('div', [
@ -305,24 +302,32 @@ PendingTx.prototype.render = function () {
}, 'Buy Ether')
: null,
h('button', {
onClick: (event) => {
this.resetGasFields()
event.preventDefault()
},
}, 'Reset'),
// Accept Button
h('input.confirm.btn-green', {
type: 'submit',
value: 'SUBMIT',
style: { marginLeft: '10px' },
disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting,
}),
h('form#pending-tx-form', {
onSubmit: this.onSubmit.bind(this),
}, [
// Reset Button
h('button', {
onClick: (event) => {
this.resetGasFields()
event.preventDefault()
},
}, 'Reset'),
// Accept Button
h('input.confirm.btn-green', {
type: 'submit',
value: 'SUBMIT',
style: { marginLeft: '10px' },
disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting,
}),
// Cancel Button
h('button.cancel.btn-red', {
onClick: props.cancelTransaction,
}, 'Reject'),
]),
h('button.cancel.btn-red', {
onClick: props.cancelTransaction,
}, 'Reject'),
]),
]),
])