Skip to content

refactor(cozy-harvest-lib): Remove dead code #1890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

2 changes: 0 additions & 2 deletions packages/cozy-harvest-lib/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import TriggerManagerWithoutLocales, {
} from './components/TriggerManager'
import FlowProviderWithLocales from './components/FlowProvider'
import RoutesWithoutLocales from './components/Routes'
import withKonnectorModalWithoutLocales from './components/hoc/withKonnectorModal'
import KonnectorSuggestionModalWithoutLocales from './components/KonnectorSuggestionModal'
import deprecated from './deprecated'

Expand All @@ -29,7 +28,6 @@ import { FlowProvider } from "cozy-harvest-lib"
`
)(FlowProvider)
export const Routes = withLocales(RoutesWithoutLocales)
export const withKonnectorModal = withLocales(withKonnectorModalWithoutLocales)
export const KonnectorSuggestionModal = withLocales(
KonnectorSuggestionModalWithoutLocales
)
Expand Down
14 changes: 0 additions & 14 deletions packages/cozy-harvest-lib/src/services/bi-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ const encodeToForm = rawForm => {
return formData
}

export const getBIUserConfig = async (config, biAccessToken) => {
return await biRequest('GET', '/users/me/config', config, null, biAccessToken)
}

export const updateBIUserConfig = async (config, userConfig, biAccessToken) => {
return await biRequest(
'POST',
'/users/me/config',
config,
encodeToForm(userConfig),
biAccessToken
)
}

/**
* Get a bi connection given it's id
*
Expand Down
27 changes: 0 additions & 27 deletions packages/cozy-harvest-lib/src/services/budget-insight.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
getBIConnection,
createBIConnection,
updateBIConnection,
getBIUserConfig,
updateBIUserConfig,
setBIConnectionSyncStatus
} from './bi-http'
import assert from '../assert'
Expand Down Expand Up @@ -450,31 +448,6 @@ export const setSync = async ({
)
}

export const getUserConfig = async ({ client, konnector, account }) => {
const { code: temporaryToken, ...config } = await createTemporaryToken({
client,
konnector,
account
})
const data = await getBIUserConfig(config, temporaryToken)
return data
}

export const updateUserConfig = async ({
client,
konnector,
userConfig,
account
}) => {
const { code: temporaryToken, ...config } = await createTemporaryToken({
client,
konnector,
account
})
const data = await updateBIUserConfig(config, userConfig, temporaryToken)
return data
}

export const getCozyBankId = ({ konnector, account }) => {
const cozyBankId =
get(konnector, 'parameters.bankId') || get(account, 'auth.bankId')
Expand Down