|
@ -141,7 +141,7 @@ class Request extends React.Component { |
|
|
*/ |
|
|
*/ |
|
|
handleAmountCryptoChange = e => { |
|
|
handleAmountCryptoChange = e => { |
|
|
const { cryptoCurrency, currentTicker, fiatCurrency } = this.props |
|
|
const { cryptoCurrency, currentTicker, fiatCurrency } = this.props |
|
|
const lastPrice = currentTicker[fiatCurrency].last |
|
|
const lastPrice = currentTicker[fiatCurrency] |
|
|
const value = convert(cryptoCurrency, 'fiat', e.target.value, lastPrice) |
|
|
const value = convert(cryptoCurrency, 'fiat', e.target.value, lastPrice) |
|
|
this.formApi.setValue('amountFiat', value) |
|
|
this.formApi.setValue('amountFiat', value) |
|
|
} |
|
|
} |
|
@ -151,7 +151,7 @@ class Request extends React.Component { |
|
|
*/ |
|
|
*/ |
|
|
handleAmountFiatChange = e => { |
|
|
handleAmountFiatChange = e => { |
|
|
const { cryptoCurrency, currentTicker, fiatCurrency } = this.props |
|
|
const { cryptoCurrency, currentTicker, fiatCurrency } = this.props |
|
|
const lastPrice = currentTicker[fiatCurrency].last |
|
|
const lastPrice = currentTicker[fiatCurrency] |
|
|
const value = convert('fiat', cryptoCurrency, e.target.value, lastPrice) |
|
|
const value = convert('fiat', cryptoCurrency, e.target.value, lastPrice) |
|
|
this.formApi.setValue('amountCrypto', value) |
|
|
this.formApi.setValue('amountCrypto', value) |
|
|
} |
|
|
} |
|
|