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, key: txMeta.id,
}, [ }, [
h('form#pending-tx-form', { h('div', {
onSubmit: this.onSubmit.bind(this),
}, [ }, [
// tx info // tx info
h('div', [ h('div', [
@ -305,6 +302,11 @@ PendingTx.prototype.render = function () {
}, 'Buy Ether') }, 'Buy Ether')
: null, : null,
h('form#pending-tx-form', {
onSubmit: this.onSubmit.bind(this),
}, [
// Reset Button
h('button', { h('button', {
onClick: (event) => { onClick: (event) => {
this.resetGasFields() this.resetGasFields()
@ -320,10 +322,13 @@ PendingTx.prototype.render = function () {
disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting, disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting,
}), }),
// Cancel Button
h('button.cancel.btn-red', { h('button.cancel.btn-red', {
onClick: props.cancelTransaction, onClick: props.cancelTransaction,
}, 'Reject'), }, 'Reject'),
]), ]),
]),
]), ]),
]) ])
) )