mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
Chore: mobile sdk refinements (#858)
* Add sdk-alpha package with MRZ helper * chore: add migration report script * Add lint config and MRZ tests to sdk-alpha * fix tests * fixes. wip * fixes * fix bundler tests * mrz improvements based on cr feedback * prettier * fix build errors * Document browser shim (#859) * Validate required adapters (#861) * Use sdkError for web scanner shim (#862) * Document new workspaces in AGENTS (#864) * Add client tests (#860) * Use deep merge for client config (#863) * Add config merge helper * format * Add SDK alpha CI workflow (#865) * rename * rename file * update workflow * coderabbit feedback and fixes * fix linter * fix import paths * wip fixes * updates * fix tests * formatting * update workflow * remove console mocks * rename folder and fixes * fix tests * save wip * auto format on save for all sdk package files * fixes * cr feedback * fix pipelines
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
type ViewStyle,
|
||||
} from 'react-native';
|
||||
|
||||
import { extractMRZInfo } from '@selfxyz/sdk-alpha';
|
||||
import { extractMRZInfo } from '@selfxyz/mobile-sdk-alpha';
|
||||
|
||||
import { RCTFragment } from '@src/components/native/RCTFragment';
|
||||
|
||||
@@ -106,7 +106,20 @@ export const PassportCamera: React.FC<PassportCameraProps> = ({
|
||||
dateOfBirth: event.nativeEvent.data.birthDate,
|
||||
dateOfExpiry: event.nativeEvent.data.expiryDate,
|
||||
documentType: event.nativeEvent.data.documentType,
|
||||
countryCode: event.nativeEvent.data.countryCode,
|
||||
issuingCountry: event.nativeEvent.data.countryCode,
|
||||
nationality: event.nativeEvent.data.countryCode, // TODO: Verify if native module provides separate nationality code instead of defaulting to issuingCountry
|
||||
surname: '', // Fill with defaults as they're required
|
||||
givenNames: '',
|
||||
sex: '',
|
||||
validation: {
|
||||
format: false, // Changed from true - avoid assuming validation success before actual checks
|
||||
passportNumberChecksum: false, // Changed from true - avoid assuming validation success before actual checks
|
||||
dateOfBirthChecksum: false, // Changed from true - avoid assuming validation success before actual checks
|
||||
dateOfExpiryChecksum: false, // Changed from true - avoid assuming validation success before actual checks
|
||||
compositeChecksum: false, // Changed from true - avoid assuming validation success before actual checks
|
||||
overall: false, // Changed from true - avoid assuming validation success before actual checks
|
||||
},
|
||||
// TODO: If raw MRZ lines are accessible from native module, pass them to extractMRZInfo function to perform real checksum validations
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
|
||||
import type { extractMRZInfo } from '@selfxyz/sdk-alpha';
|
||||
import type { extractMRZInfo } from '@selfxyz/mobile-sdk-alpha';
|
||||
|
||||
// TODO: Web find a lightweight ocr or mrz scanner.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user