diff options
author | Dan Finlay <542863+danfinlay@users.noreply.github.com> | 2018-03-07 07:07:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 07:07:51 +0800 |
commit | 9762a730413129361062804aa8dfc7be7cf74868 (patch) | |
tree | 44907ad02f7fde252ba29c8e99cb4bc306cd8279 /ui/app/components/shapeshift-form.js | |
parent | 52b4876cf9a6dd4eb6bbac67242b0a9e1f3cc01b (diff) | |
parent | 376ffb758fa6b6ea1fcfde1f2addf1c5a6070339 (diff) | |
download | tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.tar tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.tar.gz tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.tar.bz2 tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.tar.lz tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.tar.xz tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.tar.zst tangerine-wallet-browser-9762a730413129361062804aa8dfc7be7cf74868.zip |
Merge pull request #3433 from danjm/i3087-shapeshift-split-undefined
Shapeshift form handles 'market info unavailable' errors.
Diffstat (limited to 'ui/app/components/shapeshift-form.js')
-rw-r--r-- | ui/app/components/shapeshift-form.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js index 648b05049..87eb1588a 100644 --- a/ui/app/components/shapeshift-form.js +++ b/ui/app/components/shapeshift-form.js @@ -14,11 +14,13 @@ function mapStateToProps (state) { tokenExchangeRates, selectedAddress, } = state.metamask + const { warning } = state.appState return { coinOptions, tokenExchangeRates, selectedAddress, + warning, } } @@ -163,7 +165,7 @@ ShapeshiftForm.prototype.renderQrCode = function () { ShapeshiftForm.prototype.render = function () { - const { coinOptions, btnClass } = this.props + const { coinOptions, btnClass, warning } = this.props const { depositCoin, errorMessage, showQrCode, depositAddress } = this.state const coinPair = `${depositCoin}_eth` const { tokenExchangeRates } = this.props @@ -206,7 +208,9 @@ ShapeshiftForm.prototype.render = function () { ]), - h('div', { + warning && h('div.shapeshift-form__address-input-label', warning), + + !warning && h('div', { className: classnames('shapeshift-form__address-input-wrapper', { 'shapeshift-form__address-input-wrapper--error': errorMessage, }), @@ -227,7 +231,7 @@ ShapeshiftForm.prototype.render = function () { h('divshapeshift-form__address-input-error-message', [errorMessage]), ]), - this.renderMarketInfo(), + !warning && this.renderMarketInfo(), ]), |