Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:ballerine-io/ballerine into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanYadaev committed Nov 7, 2024
2 parents 0a26410 + ce4c720 commit a46a15c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions apps/kyb-app/src/pages/CollectionFlow/CollectionFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ export const CollectionFlow = withSessionProtected(() => {
if (getCollectionFlowState(initialContext)?.status === CollectionFlowStatusesEnum.rejected)
return <Rejected />;

if (getCollectionFlowState(initialContext)?.status === CollectionFlowStatusesEnum.completed)
return <CompletedScreen />;

if (getCollectionFlowState(initialContext)?.status === CollectionFlowStatusesEnum.failed)
return <FailedScreen />;

return definition && collectionFlowData ? (
<DynamicUI initialState={initialUIState}>
<DynamicUI.StateManager
Expand Down
2 changes: 1 addition & 1 deletion services/workflows-service/prisma/data-migrations
3 changes: 1 addition & 2 deletions services/workflows-service/src/workflow/workflow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ type TEntityId = string;

export type TEntityType = 'endUser' | 'business';

type CollectionFlowEvent = 'approved' | 'rejected' | 'failed' | 'revision';
type CollectionFlowEvent = 'approved' | 'rejected' | 'revision';
const COLLECTION_FLOW_EVENTS_WHITELIST: readonly CollectionFlowEvent[] = [
'approved',
'rejected',
'failed',
'revision',
] as const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ window.addEventListener('message', function(event) {
// Add your custom handling logic here
} else if (event.data === 'ballerine.collection-flow.flow-failed') {
// Handle flow failure
console.log('Flow completed successfully');
console.log('Flow failed');
// Add your custom handling logic here
} else if (event.data === 'ballerine.collection-flow.flow-completed') {
// Handle flow completion
Expand Down

0 comments on commit a46a15c

Please sign in to comment.