diff options
author | Dan <danjm.com@gmail.com> | 2018-03-06 01:53:00 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-03-07 01:19:41 +0800 |
commit | 376ffb758fa6b6ea1fcfde1f2addf1c5a6070339 (patch) | |
tree | 000e45506a7dc29f915e7634bc8dbcb58ce0a2fc /ui/app/components/shapeshift-form.js | |
parent | 5f8a632fec0e83b148e4e0b7fc95339fb870d804 (diff) | |
download | tangerine-wallet-browser-376ffb758fa6b6ea1fcfde1f2addf1c5a6070339.tar.gz tangerine-wallet-browser-376ffb758fa6b6ea1fcfde1f2addf1c5a6070339.tar.zst tangerine-wallet-browser-376ffb758fa6b6ea1fcfde1f2addf1c5a6070339.zip |
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(), ]), |