From 5c7d6625e6d6393df45a99e8cee7580529966e8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 08:47:16 -0800 Subject: [PATCH 01/13] chore: bump mobile app version to 2.9.4 (#1476) Update build numbers and deployment timestamps after successful deployment. Co-authored-by: github-actions[bot] --- app/version.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/version.json b/app/version.json index 1111a10de..c434b20f2 100644 --- a/app/version.json +++ b/app/version.json @@ -1,10 +1,10 @@ { "ios": { - "build": 192, - "lastDeployed": "2025-12-05T00:06:05.459Z" + "build": 193, + "lastDeployed": "2025-12-06T09:48:56.530Z" }, "android": { - "build": 123, - "lastDeployed": "2025-11-21T00:06:05.459Z" + "build": 124, + "lastDeployed": "2025-12-06T09:48:56.530Z" } } From b2987ffd545af96a290b3aed9a680e2a94c17334 Mon Sep 17 00:00:00 2001 From: Justin Hernandez Date: Sun, 7 Dec 2025 15:42:51 -0800 Subject: [PATCH 02/13] workflow fixes (#1478) --- .github/workflows/mobile-sdk-demo-e2e.yml | 10 ++++++++-- .github/workflows/qrcode-sdk-ci.yml | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mobile-sdk-demo-e2e.yml b/.github/workflows/mobile-sdk-demo-e2e.yml index 50f617b21..d1ecbc6ec 100644 --- a/.github/workflows/mobile-sdk-demo-e2e.yml +++ b/.github/workflows/mobile-sdk-demo-e2e.yml @@ -59,6 +59,9 @@ jobs: node-version: ${{ env.NODE_VERSION }} - run: corepack enable - run: corepack prepare yarn@4.6.0 --activate + - name: Compute .yarnrc.yml hash + id: yarnrc-hash + uses: ./.github/actions/yarnrc-hash - name: Cache Yarn dependencies uses: ./.github/actions/cache-yarn with: @@ -66,7 +69,7 @@ jobs: .yarn/cache .yarn/install-state.gz .yarn/unplugged - cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('.yarnrc.yml') }} + cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ steps.yarnrc-hash.outputs.hash }} - name: Toggle Yarn hardened mode for trusted PRs if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }} run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV @@ -220,6 +223,9 @@ jobs: node-version: ${{ env.NODE_VERSION }} - run: corepack enable - run: corepack prepare yarn@4.6.0 --activate + - name: Compute .yarnrc.yml hash + id: yarnrc-hash + uses: ./.github/actions/yarnrc-hash - name: Cache Yarn dependencies uses: ./.github/actions/cache-yarn with: @@ -227,7 +233,7 @@ jobs: .yarn/cache .yarn/install-state.gz .yarn/unplugged - cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('.yarnrc.yml') }} + cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ steps.yarnrc-hash.outputs.hash }} - name: Toggle Yarn hardened mode for trusted PRs if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }} run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV diff --git a/.github/workflows/qrcode-sdk-ci.yml b/.github/workflows/qrcode-sdk-ci.yml index 5849e7d49..8b4852cc7 100644 --- a/.github/workflows/qrcode-sdk-ci.yml +++ b/.github/workflows/qrcode-sdk-ci.yml @@ -76,6 +76,7 @@ jobs: with: path: | common/dist + sdk/sdk-common/dist sdk/qrcode/dist key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }} @@ -128,6 +129,7 @@ jobs: with: path: | common/dist + sdk/sdk-common/dist sdk/qrcode/dist key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }} fail-on-cache-miss: true @@ -195,6 +197,7 @@ jobs: with: path: | common/dist + sdk/sdk-common/dist sdk/qrcode/dist key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }} fail-on-cache-miss: true @@ -203,6 +206,7 @@ jobs: run: | echo "Verifying build artifacts..." ls -la common/dist/ + ls -la sdk/sdk-common/dist/ ls -la sdk/qrcode/dist/ echo "✅ Build artifacts verified" @@ -255,13 +259,11 @@ jobs: with: path: | common/dist + sdk/sdk-common/dist sdk/qrcode/dist key: qrcode-sdk-build-${{ env.GH_SDK_CACHE_VERSION }}-${{ github.sha }} fail-on-cache-miss: true - - name: Build SDK common dependency - run: yarn workspace @selfxyz/sdk-common build - - name: Run tests run: yarn workspace @selfxyz/qrcode test From 3e9c2099732ea45ec93f12f2ac933adef5217eae Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Mon, 8 Dec 2025 09:55:01 +0100 Subject: [PATCH 03/13] chore: switch mobile CI runners from macOS to Ubuntu (#1458) Co-authored-by: Justin Hernandez --- .github/workflows/mobile-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mobile-ci.yml b/.github/workflows/mobile-ci.yml index b936a9b5b..d4c7d060c 100644 --- a/.github/workflows/mobile-ci.yml +++ b/.github/workflows/mobile-ci.yml @@ -35,7 +35,7 @@ concurrency: jobs: build-deps: - runs-on: macos-latest-large + runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v4 @@ -95,7 +95,7 @@ jobs: working-directory: ./ test: - runs-on: macos-latest-large + runs-on: ubuntu-latest needs: build-deps timeout-minutes: 60 steps: From 85871827788468a669e9fd1714c227afcf348f2a Mon Sep 17 00:00:00 2001 From: Vishalkulkarni45 <109329073+Vishalkulkarni45@users.noreply.github.com> Date: Tue, 9 Dec 2025 16:10:34 +0530 Subject: [PATCH 04/13] SELF-1394: Fix/aadhaar registry (#1449) * fix: remove timestamp while cal qrhash * chore: pad the timestamp with 0 instead of skipping it --------- Co-authored-by: ayman --- circuits/circuits/register/register_aadhaar.circom | 13 +++++++++++-- common/src/utils/aadhaar/mockData.ts | 11 +++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/circuits/circuits/register/register_aadhaar.circom b/circuits/circuits/register/register_aadhaar.circom index 5e7e57da1..a51b8dcfb 100644 --- a/circuits/circuits/register/register_aadhaar.circom +++ b/circuits/circuits/register/register_aadhaar.circom @@ -113,7 +113,16 @@ template REGISTER_AADHAAR(n, k, maxDataLength){ signal output nullifier <== nullifierHasher.out; - signal qrDataHash <== PackBytesAndPoseidon(maxDataLength)(qrDataPadded); + component qrDataHasher = PackBytesAndPoseidon(maxDataLength); + for (var i = 0; i < 9; i++){ + qrDataHasher.in[i] <== qrDataPadded[i]; + } + for (var i = 9; i < 26; i++) { + qrDataHasher.in[i] <== 0; + } + for (var i = 26; i < maxDataLength; i++){ + qrDataHasher.in[i] <== qrDataPadded[i]; + } // Generate commitment component packedCommitment = PackBytesAndPoseidon(42 + 62); @@ -138,7 +147,7 @@ template REGISTER_AADHAAR(n, k, maxDataLength){ component commitmentHasher = Poseidon(5); commitmentHasher.inputs[0] <== secret; - commitmentHasher.inputs[1] <== qrDataHash; + commitmentHasher.inputs[1] <== qrDataHasher.out; commitmentHasher.inputs[2] <== nullifierHasher.out; commitmentHasher.inputs[3] <== packedCommitment.out; commitmentHasher.inputs[4] <== qrDataExtractor.photoHash; diff --git a/common/src/utils/aadhaar/mockData.ts b/common/src/utils/aadhaar/mockData.ts index 4cb80b69d..bc3509da7 100644 --- a/common/src/utils/aadhaar/mockData.ts +++ b/common/src/utils/aadhaar/mockData.ts @@ -208,8 +208,6 @@ export function prepareAadhaarDiscloseData( secret, qrDataHash: formatInput(BigInt(sharedData.qrHash)), gender: formatInput(genderAscii), - // qrDataHash: BigInt(sharedData.qrHash).toString(), - // gender: genderAscii.toString(), yob: stringToAsciiArray(sharedData.extractedFields.yob), mob: stringToAsciiArray(sharedData.extractedFields.mob), dob: stringToAsciiArray(sharedData.extractedFields.dob), @@ -551,7 +549,6 @@ export function processQRData( QRData = newTestData.testQRData; } else { QRData = testQRData.testQRData; - // console.log('testQRData:', testQRData); } return processQRDataSimple(QRData); @@ -576,7 +573,13 @@ export function processQRDataSimple(qrData: string) { // Extract actual fields from QR data instead of using hardcoded values const extractedFields = extractQRDataFields(qrDataBytes); - const qrHash = packBytesAndPoseidon(Array.from(qrDataPadded)); + // Calculate qrHash exclude timestamp (positions 9-25, 17 bytes) + const qrDataWithoutTimestamp = [ + ...Array.from(qrDataPadded.slice(0, 9)), + ...Array.from(qrDataPadded.slice(9, 26)).map((x) => 0), + ...Array.from(qrDataPadded.slice(26)), + ]; + const qrHash = packBytesAndPoseidon(qrDataWithoutTimestamp); const photo = extractPhoto(Array.from(qrDataPadded), photoEOI + 1); const photoHash = packBytesAndPoseidon(photo.bytes.map(Number)); From fc82b6b2b3871f5dad3303a3daa663d822054ee5 Mon Sep 17 00:00:00 2001 From: Aaron DeRuvo Date: Tue, 9 Dec 2025 12:56:05 +0100 Subject: [PATCH 05/13] Prepares app for Euclid (#1473) * setup IS_EUCLID build variable for conditionally using euclid desgins create a headless header that only handles the status bar, for the new screens since they manage their own make sure new screens get proper insets add recoveryphrase 3.0 fix country picker * this lint runs twice. once in repo wide lint and once here. so lets just run once to save resources Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .github/workflows/mobile-bundle-analysis.yml | 1 + .github/workflows/mobile-ci.yml | 5 +- .github/workflows/mobile-deploy.yml | 1 + app/babel.config.cjs | 5 ++ app/jest.config.cjs | 2 +- app/package.json | 4 +- app/scripts/bundle-analyze-ci.cjs | 4 +- .../navbar/HeadlessNavForEuclid.tsx | 17 ++++ app/src/hooks/useSafeAreaInsets.ts | 16 ++++ app/src/navigation/account.ts | 22 +++-- app/src/navigation/documents.ts | 15 +++- .../settings/ShowRecoveryPhraseScreen.tsx | 78 +++++++++++++++-- .../selection/CountryPickerScreen.tsx | 19 ++++- app/src/utils/devUtils.ts | 1 + app/tests/src/hooks/useModal.test.ts | 1 + .../src/integrations/nfc/nfcScanner.test.ts | 83 ++++++++++++++++++- app/tests/src/navigation/index.test.ts | 4 +- packages/mobile-sdk-alpha/package.json | 2 +- .../onboarding/country-picker-screen.tsx | 9 +- .../src/screens/CountrySelection.tsx | 2 +- yarn.lock | 19 +++-- 21 files changed, 273 insertions(+), 37 deletions(-) create mode 100644 app/src/components/navbar/HeadlessNavForEuclid.tsx create mode 100644 app/src/hooks/useSafeAreaInsets.ts diff --git a/.github/workflows/mobile-bundle-analysis.yml b/.github/workflows/mobile-bundle-analysis.yml index 198e572e0..efee6c5f4 100644 --- a/.github/workflows/mobile-bundle-analysis.yml +++ b/.github/workflows/mobile-bundle-analysis.yml @@ -5,6 +5,7 @@ env: JAVA_VERSION: 17 WORKSPACE: ${{ github.workspace }} APP_PATH: ${{ github.workspace }}/app + NODE_ENV: "production" on: pull_request: diff --git a/.github/workflows/mobile-ci.yml b/.github/workflows/mobile-ci.yml index d4c7d060c..0f1fe3c19 100644 --- a/.github/workflows/mobile-ci.yml +++ b/.github/workflows/mobile-ci.yml @@ -90,9 +90,6 @@ jobs: - name: Check App Types run: yarn types working-directory: ./app - - name: Check license headers - run: node scripts/check-license-headers.mjs --check - working-directory: ./ test: runs-on: ubuntu-latest @@ -190,6 +187,8 @@ jobs: env: # Increase Node.js memory to prevent hermes-parser WASM memory errors NODE_OPTIONS: --max-old-space-size=4096 + # Override production NODE_ENV for tests - React's production build doesn't include testing utilities + NODE_ENV: test run: | # Final verification from app directory perspective echo "Final verification before running tests (from app directory)..." diff --git a/.github/workflows/mobile-deploy.yml b/.github/workflows/mobile-deploy.yml index bd63c4e15..4ac61e8f2 100644 --- a/.github/workflows/mobile-deploy.yml +++ b/.github/workflows/mobile-deploy.yml @@ -31,6 +31,7 @@ name: Mobile Deploy env: # Build environment versions RUBY_VERSION: 3.2 + NODE_ENV: "production" JAVA_VERSION: 17 ANDROID_API_LEVEL: 35 ANDROID_NDK_VERSION: 27.0.12077973 diff --git a/app/babel.config.cjs b/app/babel.config.cjs index 44824a90e..f0861d392 100644 --- a/app/babel.config.cjs +++ b/app/babel.config.cjs @@ -26,4 +26,9 @@ module.exports = { }, ], ], + env: { + production: { + plugins: ['transform-remove-console'], + }, + }, }; diff --git a/app/jest.config.cjs b/app/jest.config.cjs index 554f36eca..a7d19eb81 100644 --- a/app/jest.config.cjs +++ b/app/jest.config.cjs @@ -16,7 +16,7 @@ module.exports = { 'node', ], transformIgnorePatterns: [ - 'node_modules/(?!(react-native|@react-native|@react-navigation|@react-native-community|@segment/analytics-react-native|@openpassport|react-native-keychain|react-native-check-version|react-native-nfc-manager|react-native-passport-reader|react-native-gesture-handler|uuid|@stablelib|@react-native-google-signin|react-native-cloud-storage|@react-native-clipboard|@react-native-firebase|@selfxyz|@sentry|@anon-aadhaar|react-native-svg|react-native-svg-circle-country-flags)/)', + 'node_modules/(?!(react-native|@react-native|@react-navigation|@react-native-community|@segment/analytics-react-native|@openpassport|react-native-keychain|react-native-check-version|react-native-nfc-manager|react-native-passport-reader|react-native-gesture-handler|uuid|@stablelib|@react-native-google-signin|react-native-cloud-storage|@react-native-clipboard|@react-native-firebase|@selfxyz|@sentry|@anon-aadhaar|react-native-svg|react-native-svg-circle-country-flags|react-native-blur-effect)/)', ], setupFiles: ['/jest.setup.js'], testMatch: [ diff --git a/app/package.json b/app/package.json index c973651a3..041d09f59 100644 --- a/app/package.json +++ b/app/package.json @@ -58,7 +58,7 @@ "sync-versions": "bundle exec fastlane ios sync_version && bundle exec fastlane android sync_version", "tag:release": "node scripts/tag.cjs release", "tag:remove": "node scripts/tag.cjs remove", - "test": "yarn build:deps && yarn jest:run --passWithNoTests && node --test scripts/tests/*.cjs", + "test": "yarn jest:run --passWithNoTests && node --test scripts/tests/*.cjs", "test:build": "yarn build:deps && yarn types && node ./scripts/bundle-analyze-ci.cjs ios && yarn test", "test:ci": "yarn jest:run --passWithNoTests && node --test scripts/tests/*.cjs", "test:coverage": "yarn jest:run --coverage --passWithNoTests", @@ -105,6 +105,7 @@ "@segment/analytics-react-native": "^2.21.2", "@segment/sovran-react-native": "^1.1.3", "@selfxyz/common": "workspace:^", + "@selfxyz/euclid": "^0.6.0", "@selfxyz/mobile-sdk-alpha": "workspace:^", "@sentry/react": "^9.32.0", "@sentry/react-native": "7.0.1", @@ -209,6 +210,7 @@ "@typescript-eslint/parser": "^8.39.0", "@vitejs/plugin-react-swc": "^3.10.2", "babel-plugin-module-resolver": "^5.0.2", + "babel-plugin-transform-remove-console": "^6.9.4", "constants-browserify": "^1.0.0", "dompurify": "^3.2.6", "eslint": "^8.57.0", diff --git a/app/scripts/bundle-analyze-ci.cjs b/app/scripts/bundle-analyze-ci.cjs index 914cf6afd..f4f7dbe72 100755 --- a/app/scripts/bundle-analyze-ci.cjs +++ b/app/scripts/bundle-analyze-ci.cjs @@ -17,8 +17,8 @@ if (!platform || !['android', 'ios'].includes(platform)) { // Bundle size thresholds in MB - easy to update! const BUNDLE_THRESHOLDS_MB = { // TODO: fix temporary bundle bump - ios: 44, - android: 44, + ios: 45, + android: 45, }; function formatBytes(bytes) { diff --git a/app/src/components/navbar/HeadlessNavForEuclid.tsx b/app/src/components/navbar/HeadlessNavForEuclid.tsx new file mode 100644 index 000000000..d2d651717 --- /dev/null +++ b/app/src/components/navbar/HeadlessNavForEuclid.tsx @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc. +// SPDX-License-Identifier: BUSL-1.1 +// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE. + +import { SystemBars } from 'react-native-edge-to-edge'; +import type { NativeStackHeaderProps } from '@react-navigation/native-stack'; + +export const HeadlessNavForEuclid = (props: NativeStackHeaderProps) => { + return ( + <> +