Skip to content

Commit

Permalink
fix - swap was not disabling the button when clearing the form
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyncee59 committed May 29, 2018
1 parent 2b743a0 commit 5d57bc7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Remote } from 'blockchain-wallet-v4/src'
const INITIAL_STATE = {
step: 1,
secondStep: Remote.NotAsked,
error: '',
error: 'initial',
payment: {},
order: {},
firstStepEnabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export default ({ api, coreSagas }) => {
yield put(actions.form.change2('exchange', 'source', target))
yield put(actions.form.change2('exchange', 'target', source))
yield call(resetForm)
yield call(validateForm)
} catch (e) {
yield put(actions.logs.logErrorMessage(logLocation, 'swapClicked', e))
}
Expand Down Expand Up @@ -150,7 +149,6 @@ export default ({ api, coreSagas }) => {
const source = prop('source', form)
const target = prop('target', form)
const sourceAmount = prop('sourceAmount', form)

const effectiveBalance = yield call(calculateEffectiveBalance, source)
const pair = yield call(getShapeShiftLimits, source, target)
const minimum = getMinimum(source.coin, pair.minimum)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export default ({ api, coreSagas }) => {
yield put(actions.form.change2('exchange', 'sourceFiat', ''))
yield put(actions.form.change2('exchange', 'targetAmount', ''))
yield put(actions.form.change2('exchange', 'targetFiat', ''))
yield put(actions.components.exchange.firstStepFormUnvalidated('initial'))
}

return {
Expand Down

0 comments on commit 5d57bc7

Please sign in to comment.