Skip to content

Commit e2aea68

Browse files
authored
Bal 4132 entity requests are failing due to missing workflowid in (#3296)
* feat: added common http params to form * feat: provided headers & workflowId as common http params to form * chore: ui & kyb bump * chore: cleanup * chore: bump
1 parent 3aecfb8 commit e2aea68

File tree

29 files changed

+151
-69
lines changed

29 files changed

+151
-69
lines changed

apps/backoffice-v2/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @ballerine/backoffice-v2
22

3+
## 0.7.146
4+
5+
### Patch Changes
6+
7+
- Bump
8+
- Updated dependencies
9+
- @ballerine/ui@0.7.146
10+
- @ballerine/react-pdf-toolkit@1.2.113
11+
312
## 0.7.145
413

514
### Patch Changes

apps/backoffice-v2/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ballerine/backoffice-v2",
3-
"version": "0.7.145",
3+
"version": "0.7.146",
44
"description": "Ballerine - Backoffice",
55
"homepage": "https://github.com/ballerine-io/ballerine",
66
"type": "module",
@@ -54,8 +54,8 @@
5454
"dependencies": {
5555
"@ballerine/blocks": "0.2.43",
5656
"@ballerine/common": "0.9.97",
57-
"@ballerine/react-pdf-toolkit": "^1.2.112",
58-
"@ballerine/ui": "0.7.145",
57+
"@ballerine/react-pdf-toolkit": "^1.2.113",
58+
"@ballerine/ui": "0.7.146",
5959
"@ballerine/workflow-browser-sdk": "0.6.120",
6060
"@ballerine/workflow-node-sdk": "0.6.120",
6161
"@fontsource/inter": "^4.5.15",

apps/kyb-app/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# kyb-app
22

3+
## 0.3.177
4+
5+
### Patch Changes
6+
7+
- Bump
8+
- Updated dependencies
9+
- @ballerine/ui@0.7.146
10+
311
## 0.3.176
412

513
### Patch Changes

apps/kyb-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ballerine/kyb-app",
33
"private": true,
4-
"version": "0.3.176",
4+
"version": "0.3.177",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -19,7 +19,7 @@
1919
"@ballerine/blocks": "0.2.43",
2020
"@ballerine/common": "^0.9.97",
2121
"@ballerine/workflow-browser-sdk": "0.6.120",
22-
"@ballerine/ui": "0.7.145",
22+
"@ballerine/ui": "0.7.146",
2323
"@lukemorales/query-key-factory": "^1.0.3",
2424
"@radix-ui/react-icons": "^1.3.0",
2525
"@rjsf/core": "^5.9.0",

apps/kyb-app/src/pages/CollectionFlow/versions/v2/components/organisms/CollectionFlowUI/CollectionFlowUI.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { useFinalSubmission } from './hooks/useFinalSubmission/useFinalSubmissio
2323
import { usePluginsHandler } from './hooks/usePluginsHandler/usePluginsHandler';
2424
import { useRevisionFields } from './hooks/useRevisionFields';
2525
import { formElementsExtends } from './ui-elemenets.extends';
26+
import { useCommonHttpParams } from './hooks/useCommonHttpParams/useCommonHttpParams';
2627

2728
interface ICollectionFlowUIProps<TValues = CollectionFlowContext> {
2829
page: UIPage<'v2'>;
@@ -50,6 +51,7 @@ export const CollectionFlowUI: FunctionComponent<ICollectionFlowUIProps> = ({
5051
const { handleEvent } = usePluginsHandler();
5152
const { sync, syncStateless, setIsSyncing } = useAppSync();
5253
const appMetadata = useAppMetadata();
54+
const commonHttpParams = useCommonHttpParams();
5355
const { pluginStatuses } = usePlugins();
5456
const revisionFields = useRevisionFields(pages, context);
5557
const { isFinalSubmissionAvailable, isFinalSubmitted, handleFinalSubmission } =
@@ -227,6 +229,7 @@ export const CollectionFlowUI: FunctionComponent<ICollectionFlowUIProps> = ({
227229
validationParams={validationParams}
228230
metadata={metadata}
229231
ref={formRef}
232+
httpParams={commonHttpParams}
230233
/>
231234
</div>
232235
);

apps/kyb-app/src/pages/CollectionFlow/versions/v2/components/organisms/CollectionFlowUI/hooks/useAppMetadata/useAppMetadata.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { getAccessToken } from '@/helpers/get-access-token.helper';
21
import { useMemo } from 'react';
32

43
export const useAppMetadata = () => {
54
return useMemo(
65
() => ({
76
apiUrl: import.meta.env.VITE_API_URL,
8-
accessToken: getAccessToken() || null,
97
}),
108
[],
119
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { useMemo } from 'react';
2+
import { useSearchParams } from 'react-router-dom';
3+
import { TCommonHttpParams } from '@ballerine/ui';
4+
5+
export const useCommonHttpParams = () => {
6+
const [searchParams] = useSearchParams();
7+
8+
const commonHttpParams: TCommonHttpParams = useMemo(() => {
9+
const accessToken = searchParams.get('token');
10+
const workflowId = searchParams.get('workflowId');
11+
12+
return {
13+
headers: {
14+
Authorization: `Bearer ${accessToken || null}`,
15+
},
16+
params: {
17+
...(workflowId && { workflowId }),
18+
},
19+
};
20+
}, [searchParams]);
21+
22+
return commonHttpParams;
23+
};

packages/react-pdf-toolkit/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @ballerine/react-pdf-toolkit
22

3+
## 1.2.113
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @ballerine/ui@0.7.146
9+
310
## 1.2.112
411

512
### Patch Changes

packages/react-pdf-toolkit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ballerine/react-pdf-toolkit",
33
"private": false,
4-
"version": "1.2.112",
4+
"version": "1.2.113",
55
"types": "./dist/build.d.ts",
66
"main": "./dist/react-pdf-toolkit.js",
77
"module": "./dist/react-pdf-toolkit.mjs",
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"@ballerine/config": "^1.1.40",
30-
"@ballerine/ui": "0.7.145",
30+
"@ballerine/ui": "0.7.146",
3131
"@react-pdf/renderer": "^3.1.14",
3232
"@sinclair/typebox": "^0.31.7",
3333
"ajv": "^8.12.0",

packages/ui/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @ballerine/ui
22

3+
## 0.7.146
4+
5+
### Patch Changes
6+
7+
- Bump
8+
39
## 0.7.145
410

511
### Patch Changes

0 commit comments

Comments
 (0)