-
Notifications
You must be signed in to change notification settings - Fork 179
chore update mobile app types #1087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRefactors the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Screen as DocumentNFCScanScreen
participant NFC as NFC Module
participant Analytics as Analytics/Logger
Note over Screen: baseContext = useMemo(route.params)
User->>Screen: Open screen
activate Screen
Screen->>Analytics: log("screen_mount", baseContext)
Screen->>NFC: checkNfcSupport(baseContext)
NFC-->>Screen: supportStatus
Screen-->>User: UI updates
User->>Screen: Tap Verify
Screen->>NFC: startScan(baseContext)
NFC-->>Screen: scanResult / error
alt success
Screen->>Analytics: log("nfc_success", baseContext)
Screen-->>User: Show result
else error
Screen->>Analytics: log("nfc_error", baseContext)
Screen-->>User: Open error modal
end
User->>Screen: Navigate away
Screen->>Analytics: log("screen_unmount", baseContext)
deactivate Screen
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/src/mocks/react-native-svg.ts (1)
42-62: Sanitize XML, prevent prop override of innerHTML, and fix width/height fallback.
- Raw
dangerouslySetInnerHTMLis an XSS risk; mirror the DOMPurify behavior used in SvgXmlWrapper.web.tsx.- Don’t allow callers to override
dangerouslySetInnerHTMLvia...props.- Using
||for numeric width/height treats0as falsy; use nullish coalescing so0remains valid.Apply this diff:
@@ -import React, { createElement, forwardRef } from 'react'; +import React, { createElement, forwardRef } from 'react'; +import DOMPurify from 'dompurify'; @@ -export const SvgXml = forwardRef< +export const SvgXml = forwardRef< HTMLDivElement, { xml: string; width?: number; height?: number; style?: React.CSSProperties; } >(({ xml, width, height, style, ...props }, ref) => { - return createElement('div', { - ref, - style: { - width: width || 'auto', - height: height || 'auto', - display: 'inline-block', - ...style, - }, - dangerouslySetInnerHTML: { __html: xml }, - ...props, - }); + const safe = + typeof window !== 'undefined' + ? DOMPurify(window).sanitize(xml, { USE_PROFILES: { svg: true, svgFilters: true } }) + : xml; + // Prevent callers from overriding the sanitized HTML. + const { dangerouslySetInnerHTML: _ignored, ...rest } = props as { dangerouslySetInnerHTML?: unknown }; + return createElement('div', { + ...rest, + ref, + style: { + width: width ?? 'auto', + height: height ?? 'auto', + display: 'inline-block', + ...style, + }, + dangerouslySetInnerHTML: { __html: safe }, + }); });
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
app/src/mocks/react-native-svg.ts(2 hunks)app/src/navigation/index.tsx(0 hunks)app/src/screens/document/DocumentNFCScanScreen.tsx(7 hunks)app/src/screens/home/IdDetailsScreen.tsx(1 hunks)app/src/screens/home/ProofHistoryList.tsx(0 hunks)app/src/utils/nfcScanner.ts(2 hunks)app/tests/utils/proving/provingMachine.disclose.stateless.test.ts(1 hunks)sdk/core/src/SelfBackendVerifier.ts(1 hunks)
💤 Files with no reviewable changes (2)
- app/src/navigation/index.tsx
- app/src/screens/home/ProofHistoryList.tsx
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/technical-specification.mdc)
**/*.{ts,tsx}: Define IdentityCommitment with fields: commitment (Poseidon hash), nullifier (domain-separated), timestamp (UTC number), version (circuit version), documentType ('passport' | 'eu_id_card')
Define DSCKeyCommitment with fields: publicKeyHash (Poseidon hash), certificateChain (hashes), revocationStatus (boolean), issuer (country code)
Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Files:
sdk/core/src/SelfBackendVerifier.tsapp/tests/utils/proving/provingMachine.disclose.stateless.test.tsapp/src/utils/nfcScanner.tsapp/src/screens/home/IdDetailsScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/mocks/react-native-svg.ts
sdk/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
sdk/**/*.{ts,tsx,js,jsx}: Review SDK packages for:
- Public API design and stability
- Asynchronous flows and error handling
- Security and input validation
- Compatibility across environments
Files:
sdk/core/src/SelfBackendVerifier.ts
**/*.{test,spec}.{ts,js,tsx,jsx}
⚙️ CodeRabbit configuration file
**/*.{test,spec}.{ts,js,tsx,jsx}: Review test files for:
- Test coverage completeness
- Test case quality and edge cases
- Mock usage appropriateness
- Test readability and maintainability
Files:
app/tests/utils/proving/provingMachine.disclose.stateless.test.ts
app/src/**/*.{ts,tsx,js,jsx}
⚙️ CodeRabbit configuration file
app/src/**/*.{ts,tsx,js,jsx}: Review React Native TypeScript code for:
- Component architecture and reusability
- State management patterns
- Performance optimizations
- TypeScript type safety
- React hooks usage and dependencies
- Navigation patterns
Files:
app/src/utils/nfcScanner.tsapp/src/screens/home/IdDetailsScreen.tsxapp/src/screens/document/DocumentNFCScanScreen.tsxapp/src/mocks/react-native-svg.ts
🧠 Learnings (14)
📚 Learning: 2025-08-24T18:55:07.940Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursor/rules/technical-specification.mdc:0-0
Timestamp: 2025-08-24T18:55:07.940Z
Learning: Applies to **/*.{ts,tsx} : Define VerificationConfig with fields: circuitVersion (semver), complianceRules array, timeWindow (seconds, 24h), clockDrift (±5 min), trustAnchors, revocationRoots, timeSource (NTP), nullifierScope (domain separation)
Applied to files:
sdk/core/src/SelfBackendVerifier.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Use actual imports from selfxyz/mobile-sdk-alpha in tests
Applied to files:
app/tests/utils/proving/provingMachine.disclose.stateless.test.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Do NOT mock selfxyz/mobile-sdk-alpha in tests (avoid jest.mock('selfxyz/mobile-sdk-alpha') and replacing real functions with mocks)
Applied to files:
app/tests/utils/proving/provingMachine.disclose.stateless.test.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Never use real user PII in tests; use only synthetic, anonymized, or approved test vectors
Applied to files:
app/tests/utils/proving/provingMachine.disclose.stateless.test.ts
📚 Learning: 2025-08-26T14:49:11.190Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/passport/PassportNFCScanScreen.tsx:28-31
Timestamp: 2025-08-26T14:49:11.190Z
Learning: SelfClientProvider is wrapped in app/App.tsx, providing context for useSelfClient() hook usage throughout the React Native app navigation stacks.
Applied to files:
app/tests/utils/proving/provingMachine.disclose.stateless.test.tsapp/src/screens/home/IdDetailsScreen.tsx
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to native/ios/**/*.{swift} : iOS NFC: implement custom PassportReader as a Swift module
Applied to files:
app/src/utils/nfcScanner.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Ensure parseNFCResponse() works with representative, synthetic NFC data
Applied to files:
app/src/utils/nfcScanner.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Test isPassportDataValid() with realistic synthetic passport data (never real user data)
Applied to files:
app/src/utils/nfcScanner.ts
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to native/android/**/*.{kt,kts} : Android NFC: implement RNPassportReaderModule in Kotlin
Applied to files:
app/src/utils/nfcScanner.ts
📚 Learning: 2025-09-10T14:47:40.945Z
Learnt from: shazarre
PR: selfxyz/self#1041
File: app/src/providers/passportDataProvider.tsx:297-301
Timestamp: 2025-09-10T14:47:40.945Z
Learning: In app/src/providers/passportDataProvider.tsx: The deleteDocumentDirectlyFromKeychain function is a low-level utility used by the DocumentsAdapter and should not include error handling since callers like deleteDocument() already implement appropriate try/catch with logging for Keychain operations.
Applied to files:
app/src/utils/nfcScanner.ts
📚 Learning: 2025-08-29T15:31:15.924Z
Learnt from: CR
PR: selfxyz/self#0
File: packages/mobile-sdk-alpha/AGENTS.md:0-0
Timestamp: 2025-08-29T15:31:15.924Z
Learning: Applies to packages/mobile-sdk-alpha/{**/*.test.{ts,tsx},**/__tests__/**/*.{ts,tsx}} : Verify extractMRZInfo() using published sample MRZ strings (e.g., ICAO examples)
Applied to files:
app/src/utils/nfcScanner.ts
📚 Learning: 2025-08-26T14:41:41.821Z
Learnt from: shazarre
PR: selfxyz/self#936
File: app/src/screens/aesop/PassportOnboardingScreen.tsx:0-0
Timestamp: 2025-08-26T14:41:41.821Z
Learning: When verifying provider hierarchies in React Native apps, always check the main App.tsx file at the app root, not just navigation/index.tsx and layout files, as providers are often configured at the top-level App component.
Applied to files:
app/src/screens/home/IdDetailsScreen.tsx
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Applies to src/**/*.{tsx} : Ensure proper cleanup in useEffect and on component unmount
Applied to files:
app/src/screens/document/DocumentNFCScanScreen.tsx
📚 Learning: 2025-08-24T18:52:25.796Z
Learnt from: CR
PR: selfxyz/self#0
File: .cursorrules:0-0
Timestamp: 2025-08-24T18:52:25.796Z
Learning: Use custom hooks for complex state (useModal, useHapticNavigation)
Applied to files:
app/src/screens/document/DocumentNFCScanScreen.tsx
🧬 Code graph analysis (2)
app/src/utils/nfcScanner.ts (1)
app/ios/PassportReader.swift (6)
iOS(32-364)scanPassport(78-239)convertDataGroupHashToSerializableFormat(335-342)convertDataGroupToSerializableFormat(352-358)iOS(13-23)serializeSignature(279-287)
app/src/mocks/react-native-svg.ts (2)
app/src/components/homeScreen/SvgXmlWrapper.web.tsx (1)
SvgXml(20-39)app/src/components/homeScreen/SvgXmlWrapper.native.tsx (1)
SvgXml(16-16)
🪛 GitHub Actions: Common CI
app/src/screens/document/DocumentNFCScanScreen.tsx
[error] 134-134: TypeScript error TS2345: Argument of type '{ stage: string; sessionId: string; platform: 'ios' | 'android'; scanType: string; }' is not assignable to parameter of type 'NFCScanContext'.
🪛 GitHub Actions: Workspace CI
app/src/screens/document/DocumentNFCScanScreen.tsx
[error] 134-134: TS2345: Argument of type '{ stage: string; sessionId: string; platform: "ios" | "android"; scanType: string; }' is not assignable to parameter of type 'NFCScanContext'.
⏰ Context from checks skipped due to timeout of 300000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: e2e-ios
- GitHub Check: build-deps
- GitHub Check: analyze-ios
- GitHub Check: analyze-android
🔇 Additional comments (11)
sdk/core/src/SelfBackendVerifier.ts (1)
271-273: Formatting-only EOD computation — OKNo behavior change; the EOD math remains 23:59:59 local. Safe to merge.
app/tests/utils/proving/provingMachine.disclose.stateless.test.ts (1)
6-6: Import cleanup keeps SDK store usage intact — OKTests still seed state via useSelfAppStore and isolate useProtocolStore per test. No risk.
app/src/utils/nfcScanner.ts (2)
156-165: iOS: Commenting optional fields doesn’t alter returned shape — OKThe PassportData payload keys consumed downstream are unchanged.
206-212: Android: Optional field comments are no-ops — OKReturn structure remains stable; parsers keep working.
app/src/screens/home/IdDetailsScreen.tsx (1)
16-16: Switch to named export for ProofHistoryList — OKMatches module’s updated export; no runtime impact.
app/src/screens/document/DocumentNFCScanScreen.tsx (5)
200-201: Open-error modal logging contextGood use of shared baseContext; ensure userId is present per the fix above to avoid repeat TS2345s.
245-245: Capability check logging contextSame note: with userId in baseContext, this satisfies NFCScanContext.
495-495: onVerifyPress deps include baseContextCorrect to keep analytics/logging aligned with scan type toggles; ensure the baseContext typing fix is applied.
590-590: useFocusEffect deps include baseContextLooks good; avoids stale values in focus/blur logs once baseContext is typed and complete.
118-125: Incorrect — userId is optional on BaseContext; don't add useSelfAppStore importapp/src/Sentry.ts declares BaseContext.userId?: string and NFCScanContext extends it, and DocumentNFCScanScreen already supplies sessionId/platform/scanType and adds stage at each log call (see app/src/screens/document/DocumentNFCScanScreen.tsx ~lines 118–125). Adding useSelfAppStore is unnecessary for type-safety; if TS still complains, annotate baseContext with a type instead (e.g. useMemo<Omit<NFCScanContext,'stage'>>(...)) to satisfy the compiler.
Likely an incorrect or invalid review comment.
app/src/mocks/react-native-svg.ts (1)
5-5: No action needed on import line.
Import style is fine; leave as-is unless your TS config enforces type‑only imports.
| export const Circle = forwardRef< | ||
| SVGCircleElement, | ||
| React.SVGProps<SVGCircleElement> | ||
| >((props, ref) => { | ||
| return React.createElement('circle', { ref, ...props }); | ||
| return createElement('circle', { ref, ...props }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forwarded ref can be shadowed by a user-provided prop. Place ref last.
Spreading ...props after ref lets a stray ref prop override the forwarded ref, breaking ref wiring. Put ref last across these elements.
Apply this diff:
- return createElement('circle', { ref, ...props });
+ return createElement('circle', { ...props, ref });
- return createElement('path', { ref, ...props });
+ return createElement('path', { ...props, ref });
- return createElement('rect', { ref, ...props });
+ return createElement('rect', { ...props, ref });
- return createElement('svg', { ref, ...props });
+ return createElement('svg', { ...props, ref });Also applies to: 16-20, 24-28, 33-37
🤖 Prompt for AI Agents
In app/src/mocks/react-native-svg.ts around lines 7-12 (and also apply same
change to ranges 16-20, 24-28, 33-37), the forwarded ref is being passed before
spreading props which allows a user-provided ref in ...props to shadow the
forwarded ref; update each createElement call so the ref property is placed
after the spread (i.e., spread props first, then set ref last) to ensure the
forwarded ref cannot be overridden.
| }); | ||
| }; | ||
| }, []); | ||
| }, [baseContext]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All logNFCEvent calls must pass NFCScanContext
Once baseContext includes userId, spreading with stage should satisfy the type at every call site (this one included). If TS still complains, cast per call: { ...baseContext, stage: 'mount' } as NFCScanContext.
🤖 Prompt for AI Agents
In app/src/screens/document/DocumentNFCScanScreen.tsx around line 141, the
logNFCEvent call is missing an NFCScanContext-typed object; update the call to
pass { ...baseContext, stage: 'mount' } so the staged spread satisfies the
NFCScanContext type (if TypeScript still complains, cast each call as {
...baseContext, stage: 'mount' } as NFCScanContext).
e710611 to
cd0e5ee
Compare
* chore: bump v2.6.5 rd2 (#1067) * commit wip version bump * remove from building * chore: update tooling dependencies (#1069) * chore: update tooling dependencies * chore: align react typings and node types * update lock * chore: minor fixes across monorepo (#1068) * small fixes * fixes * fix gesture handler error * ci fixes * fix yarn build; add workflow ci (#1075) * add new workspace ci * disable package version check for now * build before checks * format * fix in future pr * feat: add functions for disclosing aadhaar attributes (#1033) * feat: add functions for disclosing aadhaar attributes * format * chore: update monorepo artifacts (#1079) * remove unneeded artifacts, skip building circuits * update md files * cleans up unused parts of sdk interface, adds inline documentation, (#1078) * cleans up unused parts of sdk interface, adds inline documentation, * fix up build * yolo * Feat/aadhaar sdk (#1082) * feat: add aadhaar support to the ts sdk * feat: aadhaar support to go sdk * chore: refactor * move clearPassportData, markCurrentDocumentAsRegistered, reStorePassportDataWithRightCSCA to SDK (#1041) * Move self app store to mobile sdk (#1040) * chore(mobile-sdk-alpha): remove unused tslib dependency (#1053) * remove tslib -- seems unused * remove deps accidentally added to root * build file * remove unused imports (#1055) * fix: sha256 signed attr tests (#1058) * fix mock screen launch (#1059) * Hotfix: Belgium ID cards (#1061) * feat: parse belgium TD1 mrz android * feat: Parse Belgium TD1 MRZ IOS * fix: OFAC trees not found (#1060) * fix: relax OFAC tree response validation * test: cover OFAC tree edge cases * fix stateless * revert and fix types * fix tests * [SELF-723] feat: add structured NFC and Proof logging (#1048) * feat: add structured NFC logging * fix ci * Fix: add deps * logging fixes. use breadcrumbs * fix android build * update SeverityLevel * [SELF-705] feat: add proof event logging (#1057) * feat: add proof event logging * refactor: unify sentry event logging * fix types * fix mock * simplify * code rabbit feedback * fix tests --------- Co-authored-by: seshanthS <[email protected]> * skip on dev (#1063) * don't get fancy just disable (#1064) * saw it building so gonna try (#1065) * chore: bump v2.6.5 rd2 (#1067) * commit wip version bump * remove from building * chore: update tooling dependencies (#1069) * chore: update tooling dependencies * chore: align react typings and node types * update lock * chore: minor fixes across monorepo (#1068) * small fixes * fixes * fix gesture handler error * ci fixes * fix yarn build; add workflow ci (#1075) * add new workspace ci * disable package version check for now * build before checks * format * fix in future pr * feat: add functions for disclosing aadhaar attributes (#1033) * feat: add functions for disclosing aadhaar attributes * format * chore: update monorepo artifacts (#1079) * remove unneeded artifacts, skip building circuits * update md files * chore: update hub contract address * format * fix: add aadhaar in AllIds * chore: bump to v1.1.0-beta --------- Co-authored-by: vishal <[email protected]> Co-authored-by: Leszek Stachowski <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: seshanthS <[email protected]> * feat: change to gcp attestation verification (#959) * feat: change to gcp attestation verification * lint * fix e2e test * chore: don't check PCR0 mapping if building the app locally * fmt:fix --------- Co-authored-by: Justin Hernandez <[email protected]> * Mobile SDK: move provingMachine from the app (#1052) * Mobile SDK: move provingMachine from the app * lint, fixes * fix web build? * lint * fix metro build, add deps * update lock files * move the status handlers and proving machine tests * may it be * fix up * yolo --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> * Revert "Mobile SDK: move provingMachine from the app (#1052)" (#1084) This reverts commit 8983ac2. * fix: sdk (#1085) * bump sdk (#1086) * chore update mobile app types (#1087) * clean up types * clean up additional types * format * fix types * feat: add contract utils (#1088) * Feat/contracts npm publish (#1089) * chore: ci to publish contracts * yarn fmt * fix: use celo sepolia in common (#1091) * chore: export selfappbuilder (#1092) * [SELF-747] feat: clone android passport reader during setup (#1080) * chore: remove android private modules doc * private repo pull * skip private modules * remove unused circuits building * save wip * format * restore tsconfig * fix package install * fix internal repo cloning * unify logic and fix cloning * git clone internal repos efficiently * formatting * run app yarn reinstall from root * coderabbit feedback * coderabbit suggestions * remove skip private modules logic * fix: ensure PAT is passed through yarn-install action and handle missing PAT gracefully - Update yarn-install action to pass SELFXYZ_INTERNAL_REPO_PAT to yarn install - Make setup-private-modules.cjs skip gracefully when PAT is unavailable in CI - Fixes issue where setup script was throwing error instead of skipping for forks * prettier * fix clone ci * clone ci fixes * fix import export sorts * fix instructions * fix: remove SelfAppBuilder re-export to fix duplicate export error - Remove SelfAppBuilder import/export from @selfxyz/qrcode - Update README to import SelfAppBuilder directly from @selfxyz/common - Fixes CI build failure with duplicate export error * fix: unify eslint-plugin-sort-exports version across workspaces - Update mobile-sdk-alpha from 0.8.0 to 0.9.1 to match other workspaces - Removes yarn.lock version conflict causing CI/local behavior mismatch - Fixes quality-checks workflow linting failure * fix: bust qrcode SDK build cache to resolve stale SelfAppBuilder issue - Increment GH_SDK_CACHE_VERSION from v1 to v2 - Forces CI to rebuild artifacts from scratch instead of using cached version - Resolves quality-checks linter error showing removed SelfAppBuilder export * skip job * test yarn cache * bump cache version to try and fix the issue * revert cache version * refactor: use direct re-exports for cleaner qrcode package structure - Replace import-then-export pattern with direct re-exports - Keep SelfAppBuilder export with proper alphabetical sorting (before SelfQRcode) - Maintain API compatibility as documented in README - Eliminates linter sorting issues while keeping clean code structure * fix: separate type and value imports in README examples - Import SelfApp as type since it's an interface - Import SelfAppBuilder as value since it's a class - Follows TypeScript best practices and improves tree shaking * address version mismatches and package resolutions (#1081) * fix package version mismatches and resolutions * fixes * update lock * fix comma * fixes * fix packages * update packages * remove firebase analytics. not needed * fix: aadhaar verifier abi (#1096) * fix: aadhaar verifier abi * bump: core * fix: go-sdk (#1090) * SELF-725: add iOS qrcode opener and aadhaar screen (#1038) * add iOS qrcode opener and aadhaar screen * format * fix test * add Image-picker android (#1077) * add image-picker android * fix validation * feat: implement Aadhaar upload success and error screens, enhance AadhaarNavBar with dynamic progress indication - Added AadhaarUploadedSuccessScreen and AadhaarUploadErrorScreen components for handling upload outcomes. - Updated AadhaarNavBar to reflect current upload step with dynamic progress bar. - Integrated new screens into navigation flow for Aadhaar upload process. - Introduced blue check and warning SVG icons for visual feedback on success and error states. * feat: generate mock aadhar (#1083) * feat: generate mock aadhar * add yarn.lock * update yarn.lock * update protocolStore, update types, start modifying provingMachine * Register mock aadhar (#1093) * Register mock aadhar * fix ofac * temp: generate name * fix dob * Add Aadhaar support to ID card component and screens - Integrated Aadhaar icon and conditional rendering in IdCardLayout. - Updated AadhaarUploadScreen to process QR codes and store Aadhaar data. - Modified navigation and button text in AadhaarUploadedSuccessScreen. - Added mock data generation for Aadhaar in the mobile SDK. - Updated ManageDocumentsScreen to include Aadhaar document type. - Enhanced error handling and validation for Aadhaar QR code processing. - Added utility functions for Aadhaar data extraction and commitment processing. * aadhaar disclose - wip (#1094) * fix: timestamp cal of extractQRDataFields * Feat/aadhar fixes (#1099) * Fix - android aadhar qr scanner * fixes * update text * yarn nice * run prettier * Add mock Aadhaar certificates for development - Introduced hardcoded Aadhaar test certificates for development purposes. - Moved Aadhaar mock private and public keys to a dedicated file for better organization. - Updated the mock ID document generation utility to utilize the new Aadhaar mock certificates. * prettier write * add 'add-aadhaar' button (#1100) * Update .gitleaks.toml to include path for mock certificates in the common/dist directory * yarn nice * Enhance Aadhaar error handling with specific error types - Updated the AadhaarUploadErrorScreen to display different messages based on the error type (general or expired). - Modified the AadhaarUploadScreen to pass the appropriate error type when navigating to the error screen. - Set initial parameters for the home screen to include a default error type. * Update passport handling in proving machine to support Aadhaar document category - Modified the handling of country code in the useProvingStore to return 'IND' for Aadhaar documents. - Ensured that the country code is only fetched from passport metadata for non-Aadhaar documents. * tweak layout, text, change email to support, hide help button * fix ci, remove aadhaar logging, add aadhaar events * remove unused aadhaar tracking events * update globs * fix gitguardian config * don't track id --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: vishal <[email protected]> * fix aadhaar screen test (#1101) * add iOS qrcode opener and aadhaar screen * format * fix test * add Image-picker android (#1077) * add image-picker android * fix validation * feat: implement Aadhaar upload success and error screens, enhance AadhaarNavBar with dynamic progress indication - Added AadhaarUploadedSuccessScreen and AadhaarUploadErrorScreen components for handling upload outcomes. - Updated AadhaarNavBar to reflect current upload step with dynamic progress bar. - Integrated new screens into navigation flow for Aadhaar upload process. - Introduced blue check and warning SVG icons for visual feedback on success and error states. * feat: generate mock aadhar (#1083) * feat: generate mock aadhar * add yarn.lock * update yarn.lock * update protocolStore, update types, start modifying provingMachine * Register mock aadhar (#1093) * Register mock aadhar * fix ofac * temp: generate name * fix dob * Add Aadhaar support to ID card component and screens - Integrated Aadhaar icon and conditional rendering in IdCardLayout. - Updated AadhaarUploadScreen to process QR codes and store Aadhaar data. - Modified navigation and button text in AadhaarUploadedSuccessScreen. - Added mock data generation for Aadhaar in the mobile SDK. - Updated ManageDocumentsScreen to include Aadhaar document type. - Enhanced error handling and validation for Aadhaar QR code processing. - Added utility functions for Aadhaar data extraction and commitment processing. * aadhaar disclose - wip (#1094) * fix: timestamp cal of extractQRDataFields * Feat/aadhar fixes (#1099) * Fix - android aadhar qr scanner * fixes * update text * yarn nice * run prettier * Add mock Aadhaar certificates for development - Introduced hardcoded Aadhaar test certificates for development purposes. - Moved Aadhaar mock private and public keys to a dedicated file for better organization. - Updated the mock ID document generation utility to utilize the new Aadhaar mock certificates. * prettier write * add 'add-aadhaar' button (#1100) * Update .gitleaks.toml to include path for mock certificates in the common/dist directory * yarn nice * Enhance Aadhaar error handling with specific error types - Updated the AadhaarUploadErrorScreen to display different messages based on the error type (general or expired). - Modified the AadhaarUploadScreen to pass the appropriate error type when navigating to the error screen. - Set initial parameters for the home screen to include a default error type. * Update passport handling in proving machine to support Aadhaar document category - Modified the handling of country code in the useProvingStore to return 'IND' for Aadhaar documents. - Ensured that the country code is only fetched from passport metadata for non-Aadhaar documents. * tweak layout, text, change email to support, hide help button * fix ci, remove aadhaar logging, add aadhaar events * remove unused aadhaar tracking events * update globs * fix gitguardian config * don't track id * fix test --------- Co-authored-by: turnoffthiscomputer <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: vishal <[email protected]> --------- Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Nesopie <[email protected]> Co-authored-by: Aaron DeRuvo <[email protected]> Co-authored-by: vishal <[email protected]> Co-authored-by: Leszek Stachowski <[email protected]> Co-authored-by: Seshanth.S🐺 <[email protected]> Co-authored-by: seshanthS <[email protected]> Co-authored-by: Justin Hernandez <[email protected]> Co-authored-by: Vishalkulkarni45 <[email protected]>
Summary by CodeRabbit
New Features
Refactor
Tests
Style
Chores