Skip to content

Commit

Permalink
Fix(embed): resolved the issue with biometric flow showing the docV f…
Browse files Browse the repository at this point in the history
…low (#275)

* Fix(embed): resolved the issue with biometric flow showing the docV flow

* Update packages/web-components/components/smart-camera-web/src/SmartCameraWeb.js

Co-authored-by: Michael <[email protected]>

* Fix example environment

* update change log

---------

Co-authored-by: Michael <[email protected]>
  • Loading branch information
ayinloya and mldangelo authored Jul 10, 2024
1 parent ceb65e2 commit 6df92f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated Storybook from 7.6.15 to 8.1.11
- Updated readme with instructions on how to run the example app in development
- Fixed the example app environment/endpoints
- Fixed biometric verification requiring id images

## [1.3.4] - 2024-07-01

Expand Down
8 changes: 6 additions & 2 deletions packages/embed/src/js/biometric-kyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,12 @@ import { version as sdkVersion } from '../../package.json';
'smart-camera-web.publish',
(event) => {
images = event.detail.images;
setActiveScreen(UploadProgressScreen);
handleFormSubmit(event);
const idRequiresTOTPConsent = ['BVN_MFA'].includes(id_info.id_type);
if (idRequiresTOTPConsent) {
handleFormSubmit();
} else {
setActiveScreen(IDInfoForm);
}
},
false,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ class SmartCameraWeb extends HTMLElement {
'selfie-capture-screens.publish',
(event) => {
this._data.images = event.detail.images;
this.setActiveScreen(this.documentCapture);
if (!this.captureId) {
this._publishSelectedImages();
} else {
this.setActiveScreen(this.documentCapture);
}
},
);

Expand Down Expand Up @@ -186,6 +190,10 @@ class SmartCameraWeb extends HTMLElement {
);
}

get captureId() {
return this.hasAttribute('capture-id');
}

get documentType() {
return this.getAttribute('document-type');
}
Expand Down

0 comments on commit 6df92f0

Please sign in to comment.