Skip to content

Commit

Permalink
chore(api): consolidate files and remove redundant types file
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed Apr 16, 2021
1 parent ffd7af4 commit 6e70095
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default ({ api, coreSagas }) => {
)
const userId = userIdR.getOrElse(null)
if (userId) {
const data = yield call(api.getProductsEligiblity)
const data = yield call(api.getProductsEligibility)
yield put(A.fetchProductsEligibilitySuccess(data))
} else {
yield put(A.fetchProductsEligibilitySuccess(Remote.Success([])))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { prop } from 'ramda'
import { bindActionCreators, Dispatch } from 'redux'

import { Remote } from 'blockchain-wallet-v4/src'
import { SBPaymentMethodType } from 'blockchain-wallet-v4/src/network/api/settingsComponent/types'
import { SBPaymentMethodType } from 'blockchain-wallet-v4/src/network/api/simpleBuy/types'
import {
ExtractSuccess,
FiatType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { connect, ConnectedProps } from 'react-redux'
import { bindActionCreators, Dispatch } from 'redux'

import { Remote } from 'blockchain-wallet-v4/src'
import { SBPaymentTypes } from 'blockchain-wallet-v4/src/network/api/settingsComponent/types'
import { SBPaymentTypes } from 'blockchain-wallet-v4/src/network/api/simpleBuy/types'
import {
BeneficiaryType,
ExtractSuccess,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CoinType, SBPaymentTypes, WalletFiatType } from 'core/types'
import { BankTransferAccountType } from 'data/types'
import { BankTransferAccountType, ProductEligibility } from 'data/types'

import {
BeneficiariesType,
Expand Down Expand Up @@ -101,9 +101,16 @@ export default ({ authorizedGet, authorizedPost, nabuUrl }) => {
data: request
})

const getProductsEligibility = (): ProductEligibility[] =>
authorizedGet({
url: nabuUrl,
endPoint: '/eligible/products'
})

return {
checkWithdrawalLocks,
getBeneficiaries,
getProductsEligibility,
getWithdrawalLocks,
getWithdrawalFees,
initiateCustodialTransfer,
Expand Down
6 changes: 0 additions & 6 deletions packages/blockchain-wallet-v4/src/network/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import misc from './misc'
import profile from './profile'
import rates from './rates'
import settings from './settings'
import settingsComponent from './settingsComponent'
import simpleBuy from './simpleBuy'
import swap from './swap'
import wallet from './wallet'
Expand Down Expand Up @@ -81,11 +80,6 @@ const api = ({
...http
}),
...settings({ rootUrl, ...http }),
...settingsComponent({
nabuUrl,
authorizedGet: authorizedHttp.get,
...http
}),
...simpleBuy({
everypayUrl,
nabuUrl,
Expand Down

This file was deleted.

0 comments on commit 6e70095

Please sign in to comment.