veryfi-lens-wasm 3.1.3 → 3.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/constants.js CHANGED
@@ -28,7 +28,7 @@ export const setApiEnvironment = (useDevApi) => {
28
28
  };
29
29
 
30
30
  export const DEFAULTS = {
31
- SDK_VERSION: '3.1.3',
31
+ SDK_VERSION: '3.1.5',
32
32
  BLUR_THRESHOLD: 0.7,
33
33
  LCD_THRESHOLD: 0.5,
34
34
  BOX_COLOR: 'rgba(84, 192, 139, 0.6)',
package/core/state.js CHANGED
@@ -140,7 +140,6 @@ export const state = {
140
140
  successHandler: null,
141
141
  updateHandler: null,
142
142
  failureHandler: null,
143
- submitHandler: null,
144
143
 
145
144
  // References
146
145
  boxRef: null,
@@ -1,7 +1,7 @@
1
1
  import { state, refs, actions } from './state.js';
2
2
  import { hideVideoOverlay, showVideoOverlay } from './overlay-controls.js';
3
3
  import { toggleTorchLight, mirrorVideo, switchCamera } from './camera.js';
4
- import { ensurePackageUploaded } from './api.js';
4
+ import { ensurePackageUploaded, handleSubmit } from './api.js';
5
5
  import { createVideo } from '../components/video.js';
6
6
  import { createBlurModal } from '../components/blurModal.js';
7
7
  import { createDocumentModal } from '../components/documentModal.js';
@@ -102,8 +102,10 @@ const getModalSubmitHandler = () => {
102
102
  } else if (typeof state.customSubmitHandler === 'function') {
103
103
  const packageInfo = await ensurePackageUploaded();
104
104
  state.customSubmitHandler(state.finalImage, packageInfo);
105
+ actions.removeOverlay?.();
105
106
  } else {
106
- state.submitHandler?.(state.finalImage);
107
+ handleSubmit(state.finalImage);
108
+ actions.removeOverlay?.();
107
109
  }
108
110
  };
109
111
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfi-lens-wasm",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "description": "Lens For Web SDK with WASM",
5
5
  "main": "veryfi-lens.js",
6
6
  "type": "module",