Skip to content

Commit

Permalink
feat(deposit): fixed issue with payment methods in case of brand new …
Browse files Browse the repository at this point in the history
…verified wallet
  • Loading branch information
milan-bc committed May 6, 2022
1 parent 067ba0b commit c2d4d84
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,7 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
const userData = selectors.modules.profile.getUserData(yield select()).getOrElse({
state: 'NONE'
} as UserDataType)

// 🚨DO NOT create the user if no currency is passed
if (userData.state === 'NONE' && !payload) {
return yield put(A.fetchPaymentMethodsSuccess(DEFAULT_BS_METHODS))
Expand Down Expand Up @@ -1097,7 +1098,9 @@ export default ({ api, coreSagas, networks }: { api: APIType; coreSagas: any; ne
const includeNonEligibleMethods = currentUserTier === 2
// if user is SDD tier 3 eligible, fetch limits for tier 3
// else let endpoint return default current tier limits for current tier of user
const includeTierLimits = userSDDEligibleTier === SDD_TIER ? SDD_TIER : undefined
// double check if user is tier 2 and in case user is ignore this property
const includeTierLimits =
userSDDEligibleTier === SDD_TIER && currentUserTier !== 2 ? SDD_TIER : undefined

let paymentMethods = yield call(
api.getBSPaymentMethods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ const DepositMethods = (props) => {
useEffect(() => {
if (props.fiatCurrency && !Remote.Success.is(props.data)) {
props.buySellActions.fetchFiatEligible(props.fiatCurrency)
props.buySellActions.fetchPaymentMethods(props.fiatCurrency)
props.brokerageActions.fetchBankTransferAccounts()
}

if (props.fiatCurrency) {
props.buySellActions.fetchPaymentMethods(props.fiatCurrency)
}
}, [])

const errorCallback = useCallback(() => {
Expand Down

0 comments on commit c2d4d84

Please sign in to comment.