Skip to content

Commit

Permalink
feat(simple buy): if user is tier2 pass check-eligibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip London committed May 27, 2020
1 parent bf3e321 commit 5445a94
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,13 @@ export default ({
try {
yield call(createUser)
yield call(waitForUserData)
const isUserTier2: boolean = yield call(isTier2)
yield put(A.fetchSBPaymentMethodsLoading())
const methods = yield call(api.getSBPaymentMethods, currency)
const methods = yield call(
api.getSBPaymentMethods,
currency,
isUserTier2 ? true : undefined
)
yield put(A.fetchSBPaymentMethodsSuccess(methods))
} catch (e) {
const error = errorHandler(e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,17 @@ export default ({
}
})

const getSBPaymentMethods = (currency: FiatType): SBPaymentMethodsType =>
const getSBPaymentMethods = (
currency: FiatType,
checkEligibility?: true
): SBPaymentMethodsType =>
authorizedGet({
url: nabuUrl,
endPoint: '/payments/methods',
contentType: 'application/json',
data: {
currency
currency,
checkEligibility
}
})

Expand Down

0 comments on commit 5445a94

Please sign in to comment.