aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/shapeshift-form.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-26 05:19:09 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-26 05:19:09 +0800
commita8e40ffe7a4e8a780fefe841ac73fe12e543f290 (patch)
treea5ce949450348914e6c5f403e52e942bb374e8ff /ui/app/components/shapeshift-form.js
parentaa13f77d6cb213a00f5f7458db4278ad466f687c (diff)
downloadtangerine-wallet-browser-a8e40ffe7a4e8a780fefe841ac73fe12e543f290.tar.gz
tangerine-wallet-browser-a8e40ffe7a4e8a780fefe841ac73fe12e543f290.tar.zst
tangerine-wallet-browser-a8e40ffe7a4e8a780fefe841ac73fe12e543f290.zip
Persist shapeshift form input values
Diffstat (limited to 'ui/app/components/shapeshift-form.js')
-rw-r--r--ui/app/components/shapeshift-form.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js
index b8650f7d5..58b7942c3 100644
--- a/ui/app/components/shapeshift-form.js
+++ b/ui/app/components/shapeshift-form.js
@@ -1,4 +1,4 @@
-const Component = require('react').Component
+const PersistentForm = require('../../lib/persistent-form')
const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
@@ -17,12 +17,15 @@ function mapStateToProps(state) {
}
}
-inherits(ShapeshiftForm, Component)
+inherits(ShapeshiftForm, PersistentForm)
function ShapeshiftForm () {
- Component.call(this)
+ PersistentForm.call(this)
+ this.persistentFormParentId = 'shapeshift-buy-form'
}
+
ShapeshiftForm.prototype.render = function () {
+
return h(ReactCSSTransitionGroup, {
className: 'css-transition-group',
transitionName: 'main',
@@ -66,6 +69,9 @@ ShapeshiftForm.prototype.renderMain = function () {
h('input#fromCoin.buy-inputs.ex-coins', {
type: 'text',
list: 'coinList',
+ dataset: {
+ persistentFormId: 'input-coin',
+ },
style: {
boxSizing: 'border-box',
},
@@ -159,6 +165,9 @@ ShapeshiftForm.prototype.renderMain = function () {
h('input#fromCoinAddress.buy-inputs', {
type: 'text',
placeholder: `Your ${coin} Refund Address`,
+ dataset: {
+ persistentFormId: 'refund-address',
+ },
style: {
boxSizing: 'border-box',
width: '278px',