aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbitpshr <mail@bitpshr.net>2018-04-29 02:41:46 +0800
committerbitpshr <mail@bitpshr.net>2018-04-29 02:41:46 +0800
commitb4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39 (patch)
tree278656dfc40c1a9a7bd64167cc4fe97851e092a3
parent805c16170453ed5106dcc1d48f0efc123831f960 (diff)
downloadtangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.tar
tangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.tar.gz
tangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.tar.bz2
tangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.tar.lz
tangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.tar.xz
tangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.tar.zst
tangerine-wallet-browser-b4b33b57bcbdc2f1c8572efb0d98cbe6b86eee39.zip
Fix ShapeShift purchases on new UI
-rw-r--r--ui/app/components/shapeshift-form.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/ui/app/components/shapeshift-form.js b/ui/app/components/shapeshift-form.js
index fd4a80a4a..22ab64426 100644
--- a/ui/app/components/shapeshift-form.js
+++ b/ui/app/components/shapeshift-form.js
@@ -55,6 +55,10 @@ function ShapeshiftForm () {
}
}
+ShapeshiftForm.prototype.getCoinPair = function () {
+ return `${this.state.depositCoin.toUpperCase()}_ETH`
+}
+
ShapeshiftForm.prototype.componentWillMount = function () {
this.props.shapeShiftSubview()
}
@@ -120,14 +124,12 @@ ShapeshiftForm.prototype.renderMetadata = function (label, value) {
}
ShapeshiftForm.prototype.renderMarketInfo = function () {
- const { depositCoin } = this.state
- const coinPair = `${depositCoin}_eth`
const { tokenExchangeRates } = this.props
const {
limit,
rate,
minimum,
- } = tokenExchangeRates[coinPair] || {}
+ } = tokenExchangeRates[this.getCoinPair()] || {}
return h('div.shapeshift-form__metadata', {}, [
@@ -172,10 +174,9 @@ ShapeshiftForm.prototype.renderQrCode = function () {
ShapeshiftForm.prototype.render = function () {
const { coinOptions, btnClass, warning } = this.props
- const { depositCoin, errorMessage, showQrCode, depositAddress } = this.state
- const coinPair = `${depositCoin}_eth`
+ const { errorMessage, showQrCode, depositAddress } = this.state
const { tokenExchangeRates } = this.props
- const token = tokenExchangeRates[coinPair]
+ const token = tokenExchangeRates[this.getCoinPair()]
return h('div.shapeshift-form-wrapper', [
showQrCode