Skip to content

Commit

Permalink
fix(setMin on OrderCheckout sell)
Browse files Browse the repository at this point in the history
  • Loading branch information
sixtedemaupeou committed May 21, 2018
1 parent cbb87eb commit 507cd9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export default ({ coreSagas }) => {
const values = yield select(selectors.form.getFormValues(form))
const leftResult = yield call(coreSagas.data.coinify.fetchQuote,
{ quote: { amount: amount * 100, baseCurrency: values.currency, quoteCurrency: 'BTC', type } })
yield put(actions.form.initialize('coinifyCheckout',
merge(values, { 'leftVal': action.payload, 'rightVal': leftResult.quoteAmount / 1e8 })))
yield put(actions.form.initialize(form,
merge(values, { 'leftVal': amount, 'rightVal': Math.abs(leftResult.quoteAmount) / 1e8 })))
yield put(A.coinifyCheckoutBusyOff())
yield put(A.clearCoinifyCheckoutError())
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Loading from '../../template.loading'

class QuoteInput extends Component {
render () {
let { data, symbol, setMax, setMin, checkoutError, increaseLimit, defaultCurrency, limits, disabled, type } = this.props
const { data, symbol, setMax, setMin, checkoutError, increaseLimit, defaultCurrency, limits, disabled, type } = this.props
return data.cata({
Success: (value) => {
const QuoteInputTemplate = type === 'buy' ? QuoteInputTemplateBuy : QuoteInputTemplateSell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class SellContainer extends React.Component {
fetchSellQuote={(quote) => fetchQuote({ quote, nextAddress: value.nextAddress })}
currency={currency}
checkoutBusy={checkoutBusy}
setMax={(amt) => this.props.coinifyActions.setCheckoutMax(amt, 'sell')}
setMax={(amt) => coinifyActions.setCheckoutMax(amt, 'sell')}
setMin={(amt) => coinifyActions.setCheckoutMin(amt, 'sell')}
paymentMedium={paymentMedium}
initiateSell={this.startSell}
step={step}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Sell = props => {
rateQuoteR,
checkoutBusy,
setMax,
setMin,
paymentMedium,
initiateSell,
step,
Expand Down Expand Up @@ -66,6 +67,7 @@ const Sell = props => {
symbol={symbol}
checkoutBusy={checkoutBusy}
setMax={setMax}
setMin={setMin}
onOrderCheckoutSubmit={onOrderCheckoutSubmit}
/>
</CheckoutWrapper>
Expand Down

0 comments on commit 507cd9d

Please sign in to comment.