mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Persist shapeshift form input values
This commit is contained in:
parent
aa13f77d6c
commit
a8e40ffe7a
@ -1,4 +1,4 @@
|
|||||||
const Component = require('react').Component
|
const PersistentForm = require('../../lib/persistent-form')
|
||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const connect = require('react-redux').connect
|
const connect = require('react-redux').connect
|
||||||
@ -17,12 +17,15 @@ function mapStateToProps(state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ShapeshiftForm, Component)
|
inherits(ShapeshiftForm, PersistentForm)
|
||||||
|
|
||||||
function ShapeshiftForm () {
|
function ShapeshiftForm () {
|
||||||
Component.call(this)
|
PersistentForm.call(this)
|
||||||
|
this.persistentFormParentId = 'shapeshift-buy-form'
|
||||||
}
|
}
|
||||||
|
|
||||||
ShapeshiftForm.prototype.render = function () {
|
ShapeshiftForm.prototype.render = function () {
|
||||||
|
|
||||||
return h(ReactCSSTransitionGroup, {
|
return h(ReactCSSTransitionGroup, {
|
||||||
className: 'css-transition-group',
|
className: 'css-transition-group',
|
||||||
transitionName: 'main',
|
transitionName: 'main',
|
||||||
@ -66,6 +69,9 @@ ShapeshiftForm.prototype.renderMain = function () {
|
|||||||
h('input#fromCoin.buy-inputs.ex-coins', {
|
h('input#fromCoin.buy-inputs.ex-coins', {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
list: 'coinList',
|
list: 'coinList',
|
||||||
|
dataset: {
|
||||||
|
persistentFormId: 'input-coin',
|
||||||
|
},
|
||||||
style: {
|
style: {
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
},
|
},
|
||||||
@ -159,6 +165,9 @@ ShapeshiftForm.prototype.renderMain = function () {
|
|||||||
h('input#fromCoinAddress.buy-inputs', {
|
h('input#fromCoinAddress.buy-inputs', {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
placeholder: `Your ${coin} Refund Address`,
|
placeholder: `Your ${coin} Refund Address`,
|
||||||
|
dataset: {
|
||||||
|
persistentFormId: 'refund-address',
|
||||||
|
},
|
||||||
style: {
|
style: {
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
width: '278px',
|
width: '278px',
|
||||||
|
Loading…
Reference in New Issue
Block a user