Skip to content

Commit ed83e57

Browse files
committed
refactor(cozy-harvest-lib): Remove dead code
`withKonnectorModal()`, `getUserConfig()` and `updateUserConfig()` seem not to be used anywhere So this commit removes them to simplify the code All those three methods where detected to be dead code because they are related to the `createTemporaryToken` investigation done in #1888 Some other dead code may remain
1 parent 90e711a commit ed83e57

File tree

3 files changed

+0
-101
lines changed

3 files changed

+0
-101
lines changed

packages/cozy-harvest-lib/src/components/hoc/withKonnectorModal.jsx

-74
This file was deleted.

packages/cozy-harvest-lib/src/index.js

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import TriggerManagerWithoutLocales, {
77
} from './components/TriggerManager'
88
import FlowProviderWithLocales from './components/FlowProvider'
99
import RoutesWithoutLocales from './components/Routes'
10-
import withKonnectorModalWithoutLocales from './components/hoc/withKonnectorModal'
1110
import KonnectorSuggestionModalWithoutLocales from './components/KonnectorSuggestionModal'
1211
import deprecated from './deprecated'
1312

@@ -29,7 +28,6 @@ import { FlowProvider } from "cozy-harvest-lib"
2928
`
3029
)(FlowProvider)
3130
export const Routes = withLocales(RoutesWithoutLocales)
32-
export const withKonnectorModal = withLocales(withKonnectorModalWithoutLocales)
3331
export const KonnectorSuggestionModal = withLocales(
3432
KonnectorSuggestionModalWithoutLocales
3533
)

packages/cozy-harvest-lib/src/services/budget-insight.js

-25
Original file line numberDiff line numberDiff line change
@@ -450,31 +450,6 @@ export const setSync = async ({
450450
)
451451
}
452452

453-
export const getUserConfig = async ({ client, konnector, account }) => {
454-
const { code: temporaryToken, ...config } = await createTemporaryToken({
455-
client,
456-
konnector,
457-
account
458-
})
459-
const data = await getBIUserConfig(config, temporaryToken)
460-
return data
461-
}
462-
463-
export const updateUserConfig = async ({
464-
client,
465-
konnector,
466-
userConfig,
467-
account
468-
}) => {
469-
const { code: temporaryToken, ...config } = await createTemporaryToken({
470-
client,
471-
konnector,
472-
account
473-
})
474-
const data = await updateBIUserConfig(config, userConfig, temporaryToken)
475-
return data
476-
}
477-
478453
export const getCozyBankId = ({ konnector, account }) => {
479454
const cozyBankId =
480455
get(konnector, 'parameters.bankId') || get(account, 'auth.bankId')

0 commit comments

Comments
 (0)