Skip to content

Commit 48f8d79

Browse files
authored
Merge pull request selfxyz#1194 from selfxyz/justin/chore-update-staging-with-id-picker
chore: update staging; release id picker `v.2.6.8`
2 parents 1ab97c3 + 318b83f commit 48f8d79

File tree

78 files changed

+3065
-1215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3065
-1215
lines changed

.github/workflows/mobile-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
else
179179
echo "✅ All required dependency files exist"
180180
fi
181-
- name: Test
181+
- name: App Tests
182182
run: |
183183
# Final verification from app directory perspective
184184
echo "Final verification before running tests (from app directory)..."
@@ -190,7 +190,7 @@ jobs:
190190
fi
191191
echo "✅ All dependencies verified, running tests..."
192192
# Run jest through yarn to avoid the build:deps step since CI already built dependencies
193-
yarn jest --passWithNoTests && node --test scripts/tests/*.cjs
193+
yarn test:ci
194194
working-directory: ./app
195195
build-ios:
196196
runs-on: macos-latest-large

.github/workflows/mobile-deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,18 @@ jobs:
590590
with:
591591
app_path: ${{ env.APP_PATH }}
592592

593+
- name: Open PR for iOS build number bump
594+
if: ${{ !env.ACT && (github.event_name != 'pull_request' || github.event.pull_request.merged == true) && success() }}
595+
uses: peter-evans/create-pull-request@v6
596+
with:
597+
title: "chore: bump iOS build for ${{ env.VERSION }}"
598+
body: "Automated bump of iOS build number by CI"
599+
commit-message: "chore: incrementing ios build number for version ${{ env.VERSION }} [github action]"
600+
branch: ci/bump-ios-build-${{ github.run_id }}
601+
base: staging
602+
add-paths: |
603+
app/version.json
604+
593605
- name: Monitor cache usage
594606
if: always()
595607
run: |
@@ -946,6 +958,18 @@ jobs:
946958
with:
947959
app_path: ${{ env.APP_PATH }}
948960

961+
- name: Open PR for Android build number bump
962+
if: ${{ !env.ACT && (github.event_name != 'pull_request' || github.event.pull_request.merged == true) && success() }}
963+
uses: peter-evans/create-pull-request@v6
964+
with:
965+
title: "chore: bump Android build for ${{ env.VERSION }}"
966+
body: "Automated bump of Android build number by CI"
967+
commit-message: "chore: incrementing android build version for version ${{ env.VERSION }} [github action]"
968+
branch: ci/bump-android-build-${{ github.run_id }}
969+
base: staging
970+
add-paths: |
971+
app/version.json
972+
949973
- name: Monitor cache usage
950974
if: always()
951975
run: |
@@ -1053,6 +1077,13 @@ jobs:
10531077
exit 0
10541078
fi
10551079
1080+
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
1081+
echo "🧪 Pull request event detected - running in dry-run mode."
1082+
echo "The following changes would be included in the version bump PR:"
1083+
git --no-pager diff --cached
1084+
exit 0
1085+
fi
1086+
10561087
# Commit the changes on a temporary local branch
10571088
git checkout -b temp-for-version-commit
10581089
git commit -m "chore: update version files after deployment [skip ci]"

app/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ PODS:
15201520
- React-Core
15211521
- react-native-netinfo (11.4.1):
15221522
- React-Core
1523-
- react-native-nfc-manager (3.17.1):
1523+
- react-native-nfc-manager (3.16.3):
15241524
- React-Core
15251525
- react-native-safe-area-context (5.6.1):
15261526
- DoubleConversion
@@ -2520,7 +2520,7 @@ SPEC CHECKSUMS:
25202520
react-native-cloud-storage: 8d89f2bc574cf11068dfd90933905974087fb9e9
25212521
react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba
25222522
react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187
2523-
react-native-nfc-manager: e5e91b4e9af0551755cdb6eaec55a8ff820ccdc6
2523+
react-native-nfc-manager: 66a00e5ddab9704efebe19d605b1b8afb0bb1bd7
25242524
react-native-safe-area-context: 90a89cb349c7f8168a707e6452288c2f665b9fd1
25252525
react-native-sqlite-storage: 0c84826214baaa498796c7e46a5ccc9a82e114ed
25262526
React-nativeconfig: 415626a63057638759bcc75e0a96e2e07771a479

app/jest.config.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ module.exports = {
1919
'^@tests$': '<rootDir>/tests/src',
2020
'^@selfxyz/mobile-sdk-alpha$':
2121
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/index.cjs',
22+
'^@selfxyz/mobile-sdk-alpha/onboarding/(.*)$':
23+
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/flows/onboarding/$1.cjs',
24+
'^@selfxyz/mobile-sdk-alpha/disclosing/(.*)$':
25+
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/flows/disclosing/$1.cjs',
2226
'^@selfxyz/mobile-sdk-alpha/(.*)$':
2327
'<rootDir>/../packages/mobile-sdk-alpha/dist/cjs/$1.cjs',
2428
// Fix snarkjs resolution for @anon-aadhaar/core

app/metro.config.cjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
66
const path = require('node:path');
7+
const fs = require('node:fs');
78
const findYarnWorkspaceRoot = require('find-yarn-workspace-root');
89

910
const defaultConfig = getDefaultConfig(__dirname);
@@ -112,6 +113,35 @@ const config = {
112113
'react-native-gesture-handler':
113114
'react-native-gesture-handler/lib/commonjs/index.js',
114115
};
116+
const sdkAlphaPath = path.resolve(
117+
workspaceRoot,
118+
'packages/mobile-sdk-alpha',
119+
);
120+
121+
// Custom resolver to handle Node.js modules and dynamic flow imports
122+
if (moduleName.startsWith('@selfxyz/mobile-sdk-alpha/')) {
123+
const subPath = moduleName.replace('@selfxyz/mobile-sdk-alpha/', '');
124+
125+
// Check if it's a flow import (onboarding/* or disclosing/*)
126+
if (
127+
subPath.startsWith('onboarding/') ||
128+
subPath.startsWith('disclosing/')
129+
) {
130+
const flowPath = path.resolve(
131+
sdkAlphaPath,
132+
'dist/esm/flows',
133+
`${subPath}.js`,
134+
);
135+
136+
// Check if the file exists
137+
if (fs.existsSync(flowPath)) {
138+
return {
139+
type: 'sourceFile',
140+
filePath: flowPath,
141+
};
142+
}
143+
}
144+
}
115145

116146
if (appLevelModules[moduleName]) {
117147
try {

app/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"tag:release": "node scripts/tag.cjs release",
5757
"tag:remove": "node scripts/tag.cjs remove",
5858
"test": "yarn build:deps && jest --passWithNoTests && node --test scripts/tests/*.cjs",
59+
"test:ci": "jest --passWithNoTests && node --test scripts/tests/*.cjs",
5960
"test:build": "yarn build:deps && yarn types && node ./scripts/bundle-analyze-ci.cjs ios && yarn test",
6061
"test:coverage": "jest --coverage --passWithNoTests",
6162
"test:coverage:ci": "jest --coverage --passWithNoTests --ci --coverageReporters=lcov --coverageReporters=text --coverageReporters=json",
@@ -140,9 +141,9 @@
140141
"react-native-keychain": "^10.0.0",
141142
"react-native-localize": "^3.5.2",
142143
"react-native-logs": "^5.3.0",
143-
"react-native-nfc-manager": "^3.16.3",
144-
"react-native-passport-reader": "^1.0.3",
145-
"react-native-safe-area-context": "^5.6.1",
144+
"react-native-nfc-manager": "3.16.3",
145+
"react-native-passport-reader": "1.0.3",
146+
"react-native-safe-area-context": "5.6.1",
146147
"react-native-screens": "4.15.3",
147148
"react-native-sqlite-storage": "^6.0.1",
148149
"react-native-svg": "15.12.1",
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
// SPDX-FileCopyrightText: 2025 Social Connect Labs, Inc.
2+
// SPDX-License-Identifier: BUSL-1.1
3+
// NOTE: Converts to Apache-2.0 on 2029-06-11 per LICENSE.
4+
5+
import LottieView from 'lottie-react-native';
6+
import React from 'react';
7+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
8+
import { Text, View, XStack, YStack } from 'tamagui';
9+
10+
import CloseWarningIcon from '@/images/icons/close-warning.svg';
11+
import Plus from '@/images/icons/plus_slate600.svg';
12+
import {
13+
black,
14+
blue600,
15+
cyan300,
16+
red500,
17+
slate400,
18+
slate600,
19+
white,
20+
zinc500,
21+
zinc900,
22+
} from '@/utils/colors';
23+
import { extraYPadding } from '@/utils/constants';
24+
import { advercase, dinot } from '@/utils/fonts';
25+
26+
interface LoadingUIProps {
27+
animationSource: LottieView['props']['source'];
28+
shouldLoopAnimation: boolean;
29+
actionText: string;
30+
actionSubText: string;
31+
estimatedTime: string;
32+
canCloseApp: boolean;
33+
statusBarProgress: number;
34+
}
35+
36+
const LoadingUI: React.FC<LoadingUIProps> = ({
37+
animationSource,
38+
shouldLoopAnimation,
39+
actionText,
40+
actionSubText,
41+
estimatedTime,
42+
canCloseApp,
43+
statusBarProgress,
44+
}) => {
45+
const { bottom } = useSafeAreaInsets();
46+
47+
const renderProgressBars = () => {
48+
const bars = [];
49+
for (let i = 0; i < 3; i++) {
50+
bars.push(
51+
<View
52+
key={`bar-${i}`}
53+
width={35}
54+
height={6}
55+
borderRadius={100}
56+
backgroundColor={i < statusBarProgress ? cyan300 : slate600}
57+
borderWidth={1}
58+
borderColor={i < statusBarProgress ? cyan300 : slate600}
59+
/>,
60+
);
61+
}
62+
bars.push(
63+
<View key="plus" marginHorizontal={8}>
64+
<Plus color={slate600} height={14} width={14} />
65+
</View>,
66+
);
67+
for (let i = 3; i < 6; i++) {
68+
bars.push(
69+
<View
70+
key={`bar-${i}`}
71+
width={35}
72+
height={6}
73+
borderRadius={100}
74+
borderWidth={1}
75+
borderColor={i < statusBarProgress ? cyan300 : slate600}
76+
backgroundColor={
77+
i < statusBarProgress
78+
? cyan300
79+
: statusBarProgress / 3 > 1
80+
? slate600
81+
: 'transparent'
82+
}
83+
/>,
84+
);
85+
}
86+
87+
return bars;
88+
};
89+
90+
return (
91+
<YStack
92+
backgroundColor={black}
93+
gap={20}
94+
justifyContent="space-between"
95+
flex={1}
96+
paddingBottom={bottom + extraYPadding}
97+
>
98+
<YStack
99+
flex={1}
100+
paddingHorizontal={15}
101+
position="relative"
102+
backgroundColor={black}
103+
justifyContent="center"
104+
alignItems="center"
105+
>
106+
<YStack
107+
width="100%"
108+
height={380}
109+
borderRadius={16}
110+
paddingVertical={20}
111+
alignItems="center"
112+
backgroundColor={zinc900}
113+
shadowColor={black}
114+
shadowOffset={{ width: 0, height: 4 }}
115+
shadowOpacity={0.2}
116+
shadowRadius={12}
117+
elevation={8}
118+
>
119+
<YStack alignItems="center" paddingHorizontal={10} flex={1}>
120+
<LottieView
121+
autoPlay
122+
loop={shouldLoopAnimation}
123+
source={animationSource}
124+
style={{
125+
width: 60,
126+
height: 60,
127+
marginTop: 30,
128+
marginBottom: 0,
129+
}}
130+
resizeMode="cover"
131+
renderMode="HARDWARE"
132+
/>
133+
<Text
134+
color={white}
135+
fontSize={28}
136+
fontFamily={advercase}
137+
textAlign="center"
138+
letterSpacing={1}
139+
fontWeight="100"
140+
marginTop={30}
141+
marginBottom={20}
142+
>
143+
{actionText}
144+
</Text>
145+
146+
<XStack gap={4} alignItems="center">
147+
{renderProgressBars()}
148+
</XStack>
149+
<Text
150+
color={slate400}
151+
fontSize={13}
152+
fontFamily={dinot}
153+
textAlign="center"
154+
marginTop={12}
155+
letterSpacing={0.44}
156+
>
157+
{actionSubText.toUpperCase()}
158+
</Text>
159+
<Text
160+
color={zinc500}
161+
fontSize={13}
162+
fontFamily={dinot}
163+
textAlign="center"
164+
marginTop={6}
165+
letterSpacing={0.44}
166+
>
167+
{6 - statusBarProgress} Steps Remaining
168+
</Text>
169+
</YStack>
170+
<YStack width="100%" alignItems="center">
171+
<YStack width="100%" height={1} backgroundColor="#232329" />
172+
<YStack
173+
flexDirection="row"
174+
alignItems="center"
175+
justifyContent="center"
176+
width="100%"
177+
marginTop={18}
178+
>
179+
<Text
180+
color={slate400}
181+
marginRight={8}
182+
fontSize={11}
183+
letterSpacing={0.44}
184+
fontFamily={dinot}
185+
>
186+
ESTIMATED TIME:
187+
</Text>
188+
<Text
189+
color={white}
190+
fontSize={11}
191+
letterSpacing={0.44}
192+
fontFamily={dinot}
193+
>
194+
{estimatedTime}
195+
</Text>
196+
</YStack>
197+
</YStack>
198+
</YStack>
199+
<YStack
200+
position="absolute"
201+
bottom={40}
202+
left={0}
203+
right={0}
204+
alignItems="center"
205+
justifyContent="center"
206+
>
207+
<CloseWarningIcon color={zinc500} height={40} />
208+
<Text
209+
color={slate400}
210+
fontSize={11}
211+
paddingTop={16}
212+
letterSpacing={0.44}
213+
textTransform="uppercase"
214+
fontFamily={dinot}
215+
textAlign="center"
216+
>
217+
{canCloseApp
218+
? 'You can now safely close the app'
219+
: 'Closing the app will cancel this process'}
220+
</Text>
221+
</YStack>
222+
</YStack>
223+
</YStack>
224+
);
225+
};
226+
227+
export default LoadingUI;
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)