mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4121 from MetaMask/i3688-shapeshift-500s
Fix ShapeShift purchases
This commit is contained in:
commit
f7ea5bf793
@ -138,7 +138,7 @@ ShapeshiftForm.prototype.renderMain = function () {
|
|||||||
width: '229px',
|
width: '229px',
|
||||||
height: '82px',
|
height: '82px',
|
||||||
},
|
},
|
||||||
}, this.props.warning)
|
}, this.props.warning + '')
|
||||||
: this.renderInfo(),
|
: this.renderInfo(),
|
||||||
|
|
||||||
this.renderRefundAddressForCoin(coin),
|
this.renderRefundAddressForCoin(coin),
|
||||||
|
@ -55,6 +55,10 @@ function ShapeshiftForm () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ShapeshiftForm.prototype.getCoinPair = function () {
|
||||||
|
return `${this.state.depositCoin.toUpperCase()}_ETH`
|
||||||
|
}
|
||||||
|
|
||||||
ShapeshiftForm.prototype.componentWillMount = function () {
|
ShapeshiftForm.prototype.componentWillMount = function () {
|
||||||
this.props.shapeShiftSubview()
|
this.props.shapeShiftSubview()
|
||||||
}
|
}
|
||||||
@ -120,14 +124,12 @@ ShapeshiftForm.prototype.renderMetadata = function (label, value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ShapeshiftForm.prototype.renderMarketInfo = function () {
|
ShapeshiftForm.prototype.renderMarketInfo = function () {
|
||||||
const { depositCoin } = this.state
|
|
||||||
const coinPair = `${depositCoin}_eth`
|
|
||||||
const { tokenExchangeRates } = this.props
|
const { tokenExchangeRates } = this.props
|
||||||
const {
|
const {
|
||||||
limit,
|
limit,
|
||||||
rate,
|
rate,
|
||||||
minimum,
|
minimum,
|
||||||
} = tokenExchangeRates[coinPair] || {}
|
} = tokenExchangeRates[this.getCoinPair()] || {}
|
||||||
|
|
||||||
return h('div.shapeshift-form__metadata', {}, [
|
return h('div.shapeshift-form__metadata', {}, [
|
||||||
|
|
||||||
@ -172,10 +174,9 @@ ShapeshiftForm.prototype.renderQrCode = function () {
|
|||||||
|
|
||||||
ShapeshiftForm.prototype.render = function () {
|
ShapeshiftForm.prototype.render = function () {
|
||||||
const { coinOptions, btnClass, warning } = this.props
|
const { coinOptions, btnClass, warning } = this.props
|
||||||
const { depositCoin, errorMessage, showQrCode, depositAddress } = this.state
|
const { errorMessage, showQrCode, depositAddress } = this.state
|
||||||
const coinPair = `${depositCoin}_eth`
|
|
||||||
const { tokenExchangeRates } = this.props
|
const { tokenExchangeRates } = this.props
|
||||||
const token = tokenExchangeRates[coinPair]
|
const token = tokenExchangeRates[this.getCoinPair()]
|
||||||
|
|
||||||
return h('div.shapeshift-form-wrapper', [
|
return h('div.shapeshift-form-wrapper', [
|
||||||
showQrCode
|
showQrCode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user