aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-26 05:10:07 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-26 05:10:07 +0800
commitb39bd5333b8bb55cc11a191313c742c60a623650 (patch)
treed40289302d153f94e6dd64384fbaedece6c11499
parent2026b674c53caf643abc69364c60250cf0163062 (diff)
downloadtangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.tar
tangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.tar.gz
tangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.tar.bz2
tangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.tar.lz
tangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.tar.xz
tangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.tar.zst
tangerine-wallet-browser-b39bd5333b8bb55cc11a191313c742c60a623650.zip
Persist send tx form field values
-rw-r--r--ui/app/send.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/ui/app/send.js b/ui/app/send.js
index 06ea199f4..0cc3a032f 100644
--- a/ui/app/send.js
+++ b/ui/app/send.js
@@ -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',
+ },
}),
]),
-
])
-
)
}