mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Persist send tx form field values
This commit is contained in:
parent
2026b674c5
commit
b39bd5333b
@ -1,5 +1,5 @@
|
||||
const inherits = require('util').inherits
|
||||
const Component = require('react').Component
|
||||
const PersistentForm = require('../lib/persistent-form')
|
||||
const h = require('react-hyperscript')
|
||||
const connect = require('react-redux').connect
|
||||
const Identicon = require('./components/identicon')
|
||||
@ -29,12 +29,14 @@ function mapStateToProps (state) {
|
||||
return result
|
||||
}
|
||||
|
||||
inherits(SendTransactionScreen, Component)
|
||||
inherits(SendTransactionScreen, PersistentForm)
|
||||
function SendTransactionScreen () {
|
||||
Component.call(this)
|
||||
PersistentForm.call(this)
|
||||
}
|
||||
|
||||
SendTransactionScreen.prototype.render = function () {
|
||||
this.persistentFormParentId = 'send-tx-form'
|
||||
|
||||
var state = this.props
|
||||
var address = state.address
|
||||
var account = state.account
|
||||
@ -137,6 +139,9 @@ SendTransactionScreen.prototype.render = function () {
|
||||
h('input.large-input', {
|
||||
name: 'address',
|
||||
placeholder: 'Recipient Address',
|
||||
dataset: {
|
||||
persistentFormId: 'recipient-address',
|
||||
},
|
||||
}),
|
||||
]),
|
||||
|
||||
@ -150,6 +155,9 @@ SendTransactionScreen.prototype.render = function () {
|
||||
style: {
|
||||
marginRight: 6,
|
||||
},
|
||||
dataset: {
|
||||
persistentFormId: 'tx-amount',
|
||||
},
|
||||
}),
|
||||
|
||||
h('button.primary', {
|
||||
@ -185,11 +193,12 @@ SendTransactionScreen.prototype.render = function () {
|
||||
width: '100%',
|
||||
resize: 'none',
|
||||
},
|
||||
dataset: {
|
||||
persistentFormId: 'tx-data',
|
||||
},
|
||||
}),
|
||||
]),
|
||||
|
||||
])
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user