Skip to content

Commit

Permalink
feat(open banking): call stuff only in case that user exists
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-bc committed Apr 13, 2021
1 parent 28fb717 commit b7b3ca5
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1292,17 +1292,18 @@ export default ({
const showModal = function * ({ payload }: ReturnType<typeof A.showModal>) {
const { cryptoCurrency, orderType, origin } = payload
const latestPendingOrder = S.getSBLatestPendingOrder(yield select())
const bankAccount = yield call(
getBankInformation,
latestPendingOrder as SBOrderType
)

yield put(
actions.modals.showModal('SIMPLE_BUY_MODAL', { origin, cryptoCurrency })
)
const fiatCurrencyR = selectors.core.settings.getCurrency(yield select())
const fiatCurrency = fiatCurrencyR.getOrElse('USD')

if (latestPendingOrder) {
const bankAccount = yield call(
getBankInformation,
latestPendingOrder as SBOrderType
)
const step =
latestPendingOrder.state === 'PENDING_CONFIRMATION'
? prop('partner', bankAccount) === 'YAPILY'
Expand Down

0 comments on commit b7b3ca5

Please sign in to comment.