Skip to content

Commit

Permalink
Merge branch 'develop' into inji-434-add-events-in-receiver-vc-sharin…
Browse files Browse the repository at this point in the history
…g-flow

Signed-off-by: Alka Prasad <[email protected]>
  • Loading branch information
Alka1703 authored Nov 6, 2023
2 parents 5d6b38e + d3118e6 commit deddf04
Show file tree
Hide file tree
Showing 87 changed files with 3,712 additions and 1,987 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ios-automation-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
with:
name: Inji
path: ios/fastlane/Inji_app_file/Products/Applications/
retention-days: 1
retention-days: 7

- name: Upload Runner Log on Failure
if: failure() # Only run this step if the previous steps failed
Expand Down
64 changes: 39 additions & 25 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
fileignoreconfig:
- filename: ios/Podfile.lock
checksum: cc123c3e1f04d41b394ceb16843b15c08bac3ba619ae853ff322717739761a85
- filename: package.json
checksum: fdd5905228a1afbfb004c710fd6c61adf073a12840200327c0592b76bea5e7e3
- filename: package-lock.json
checksum: 4515c3d663d9435eab0f56b75480c93c5209aa59befb2b71f2b3fe7c9051d80a
checksum: 179883df6d414d82b7f54353a3a4cc75e6a681224f4b6d1831ce85de27de2726
- filename: components/PasscodeVerify.tsx
checksum: 14654c0f038979fcd0d260170a45894a072f81e0767ca9a0e66935d33b5cc703
- filename: i18n.ts
checksum: 75dd5536038ba198aa7b12eb6d2c2e7042c9ce292e5a0d5c90883ae5b2312b1e
- filename: screens/BiometricScreenController.ts
checksum: b3d0184fb894f4a9ffa1a4d277d2975495dbc47771593895bf1999deabafeb94
- filename: screens/Home/MyVcs/IdInputModal.tsx
checksum: ec48ebeaf46b8fbc756f19ef8ffe8901ce0528aef164f3c7ffdeec36fb53ffc6
checksum: 75dd5536038ba198aa7b12eb6d2c2e7042c9ce292e5a0d5c90883ae5b2312b1e
- filename: components/Passcode.tsx
checksum: db4a18001be8c63bf7ffb389359861401fa1d22261b10ad729a76fd431c019a7
- filename: screens/PasscodeScreen.tsx
checksum: 0cc5b91350e491a058ee8a1878a496c16b65f14969e989bdb1c354f6e9b8c03c
- filename: locales/spa.json
checksum: 981103ff872d6f54610468c7ead65873d9294a11092649b105c552f770f0214b
checksum: db4a18001be8c63bf7ffb389359861401fa1d22261b10ad729a76fd431c019a7
- filename: components/PasscodeVerify.tsx
checksum: 14654c0f038979fcd0d260170a45894a072f81e0767ca9a0e66935d33b5cc703
- filename: screens/Home/MyVcs/GetIdInputModal.tsx
checksum: 5c736ed79a372d0ffa7c02eb33d0dc06edbbb08d120978ff287f5f06cd6c7746
- filename: screens/AuthScreen.tsx
checksum: 2c1183b2ad8ec27adf8f389a2511805493f229fdda674064e2579d2032119d1c
checksum: 4a096c467bb9b3fa476c220993ef0a58d72a758c40cf741dc2e4ec4db0c692e8
- filename: screens/BiometricScreen.tsx
checksum: 7a730731aaa7540eec9d05d73de277a665dc06425666280842e0f9ba6e5b8514
checksum: 7a730731aaa7540eec9d05d73de277a665dc06425666280842e0f9ba6e5b8514
- filename: screens/AuthScreenController.ts
checksum: 18af825821bc95e1056050623b804a5a8e7435b9e3383916a5d63024eeba9553
checksum: 18af825821bc95e1056050623b804a5a8e7435b9e3383916a5d63024eeba9553
- filename: screens/BiometricScreenController.ts
checksum: 4a424adbd2d2404c9d968c54607885af643a07e09acc4a2d37c6e7a7952c4945
- filename: screens/Home/IntroSlidersScreen.tsx
checksum: 9ff212530850e9f921f91d406c01f67ea5dd2a44e9cdb5e63d977749c7a7c5bd
- filename: machines/store.ts
checksum: fda6511ab88566820cf6b7324178b4646f495fae5168af73a0fb1c3bb52e5b8d
- filename: screens/Home/MyVcs/IdInputModal.tsx
checksum: 6f21b2caf20ee1821b69e178a69e755e0b1094275e4a9f9cb4ae5ab515ce5d23
- filename: screens/WelcomeScreenController.ts
checksum: 71917c8c543a4a5b7ab61df259b785d233a80718123b0c8edf6ec81e1b3a81e0
- filename: shared/telemetry/TelemetryUtils.js
Expand All @@ -45,17 +51,7 @@ fileignoreconfig:
- filename: screens/Home/MyVcs/GetIdInputModal.tsx
checksum: 5c736ed79a372d0ffa7c02eb33d0dc06edbbb08d120978ff287f5f06cd6c7746
- filename: shared/openId4VCI/Utils.ts
checksum: 2bd39d84099d700e5bddeebe87dfb3b0e3075edc0a4d06ce48b428b0a85e238f
- filename: machines/issuersMachine.ts
checksum: b925df13236145867fc7a1a2a703faca854e8c937dac9451008399e3937592fb
- filename: machines/issuersMachine.typegen.ts
checksum: f5e2c89f9029b1e590173e37b2cf6586d5229ecb7d4dfd4c5f050f9416d3c1cd
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.ts
checksum: eec77ca61540327ff7cab3489ebdfd47aa373fd20b3ff87a6c322cd48d35fe8f
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.typegen.ts
checksum: f1f504bd8c14496ee71f8eb7f40d54411cc05be03347d644dcc2cca187a20678
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.ts
checksum: 237a2640b7db70770d65da67c79f2929581e32f1162517e50b8d37e409f3387d
checksum: ba3041b2ce380f44f6f52dc2c3df337d857df4494bd3c8727df9bf6fb5734750
- filename: shared/cryptoutil/cryptoUtil.ts
checksum: b785ff3f01ab9530119072c4d38195048bfeee6155c54ea7dd031559acb722f3
- filename: machines/store.typegen.ts
Expand All @@ -64,3 +60,21 @@ fileignoreconfig:
checksum: 10889302ca05646a283386be1bbe7a5fb510c02bb62a308ee45f3c2a872ae64e
- filename: shared/telemetry/TelemetryConstants.js
checksum: 9d9acf3981cbde452489eacbbd70ebaa0b853c1c04e9712fa71368c089a9662b
- filename: .github/workflows/internal-build.yml
checksum: 3a3b4dea51cb496729c4e568113fc19cf5b008481bb4a5d157f211a2128b951b
- filename: .github/workflows/push-triggers.yml
checksum: c5de3d912e2cbd55f6898e2f4a24413abbee8f084c99ea11ce6265504a520ce0
- filename: android/fastlane/Fastfile
checksum: 41d1409adf8df9c843fd2dba89142cd55c471f3060ced57d48ee96dc8793ffcd
- filename: package.json
checksum: b982af1813bb72625c63eb31b3d0a6c0d970cd669d57649cc0ac9358252e3cd3
- filename: machines/VCItemMachine/EsignetMosipVCItem/EsignetMosipVCItemMachine.typegen.ts
checksum: 15308987b1aab0c51c96bfc646ae55a3d7ae728a1f6e03ab31d5e1b786da03eb
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.typegen.ts
checksum: 533785a3c8096ea93afc59c65025679c24d379e824e784e745ab298a0978cd2a
- filename: shared/telemetry/TelemetryUtils.js
checksum: a0686e9a5c006176fd720b84bc36ca947db1422caf65c90cd0c2d1102a9e96df
- filename: ios/fastlane/Fastfile
checksum: feea5a7f044ef6961d53e7d1e1ffb92a3e0f72761496424f6e64288e3718d605
version: ""

19 changes: 18 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ import {
import {DualMessageOverlay} from './components/DualMessageOverlay';
import {useApp} from './screens/AppController';
import {Alert} from 'react-native';
import {configureTelemetry} from './shared/telemetry/TelemetryUtils';
import {
TelemetryConstants,
configureTelemetry,
getErrorEventData,
sendErrorEvent,
} from './shared/telemetry/TelemetryUtils';
import {MessageOverlay} from './components/MessageOverlay';
import SecureKeystore from 'react-native-secure-keystore';
import {isHardwareKeystoreExists} from './shared/cryptoutil/cryptoUtil';
Expand Down Expand Up @@ -59,6 +64,18 @@ const AppLoadingWrapper: React.FC = () => {
);
const controller = useApp();
const {t} = useTranslation('WelcomeScreen');
useEffect(() => {
if (isKeyInvalidateError) {
configureTelemetry();
sendErrorEvent(
getErrorEventData(
TelemetryConstants.FlowType.appLogin,
TelemetryConstants.ErrorId.appWasReset,
TelemetryConstants.ErrorMessage.appWasReset,
),
);
}
}, [isKeyInvalidateError]);
return (
<>
<AppLoading />
Expand Down
46 changes: 24 additions & 22 deletions components/LanguageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,51 @@ import React from 'react';
import {SUPPORTED_LANGUAGES} from '../i18n';
import {I18nManager, View} from 'react-native';
import {Picker} from './ui/Picker';
import Storage from '../shared/storage';
import {useTranslation} from 'react-i18next';
import i18next from 'i18next';
import i18next, {i18n} from 'i18next';
import RNRestart from 'react-native-restart';
import {setItem} from '../machines/store';
import Keychain from 'react-native-keychain';

export const LanguageSelector: React.FC<LanguageSelectorProps> = props => {
const {i18n} = useTranslation();
const languages = Object.entries(SUPPORTED_LANGUAGES).map(
([value, label]) => ({label, value}),
);

const changeLanguage = async (language: string) => {
if (language !== i18n.language) {
await i18n.changeLanguage(language).then(async () => {
await Storage.setItem('language', i18n.language);
const isRTL = i18next.dir(language) === 'rtl' ? true : false;
if (isRTL !== I18nManager.isRTL) {
try {
I18nManager.forceRTL(isRTL);
setTimeout(() => {
RNRestart.Restart();
}, 150);
} catch (e) {
console.log('error', e);
}
}
});
}
};

return (
<View>
<Picker
testID="language"
items={languages}
selectedValue={i18n.language}
onValueChange={changeLanguage}
onValueChange={language => changeLanguage(i18n, language)}
triggerComponent={props.triggerComponent}
/>
</View>
);
};

export const changeLanguage = async (i18n: i18n, language: string) => {
if (language !== i18n.language) {
await i18n.changeLanguage(language).then(async () => {
const existingCredentials = await Keychain.getGenericPassword();
await setItem('language', i18n.language, existingCredentials.password);
const isRTL = i18next.dir(language) === 'rtl' ? true : false;
if (isRTL !== I18nManager.isRTL) {
try {
I18nManager.forceRTL(isRTL);
setTimeout(() => {
RNRestart.Restart();
}, 150);
} catch (e) {
console.log('error', e);
}
}
});
}
};

interface LanguageSelectorProps {
triggerComponent: React.ReactElement;
}
10 changes: 5 additions & 5 deletions components/openId4VCI/Issuer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ export const Issuer: React.FC<IssuerProps> = (props: IssuerProps) => {
style={({pressed}) =>
pressed
? [
Theme.issuersScreenStyles.issuerBoxContainerPressed,
Theme.IssuersScreenStyles.issuerBoxContainerPressed,
Theme.Styles.boxShadow,
]
: [
Theme.issuersScreenStyles.issuerBoxContainer,
Theme.IssuersScreenStyles.issuerBoxContainer,
Theme.Styles.boxShadow,
]
}>
<Image
{...testIDProps(`issuerIcon-${props.testID}`)}
style={Theme.issuersScreenStyles.issuerIcon}
style={Theme.IssuersScreenStyles.issuerIcon}
source={getIssuerLogo()}
/>
<Text
testID={`issuerHeading-${props.testID}`}
style={Theme.issuersScreenStyles.issuerHeading}>
style={Theme.IssuersScreenStyles.issuerHeading}>
{t('itemHeading', {issuer: props.displayName})}
</Text>
<Text
testID={`issuerDescription-${props.testID}`}
style={Theme.issuersScreenStyles.issuerDescription}>
style={Theme.IssuersScreenStyles.issuerDescription}>
{t('itemSubHeading')}
</Text>
</Pressable>
Expand Down
46 changes: 44 additions & 2 deletions components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1181,13 +1181,38 @@ export const DefaultTheme = {
backgroundColor: Colors.Transparent,
},
}),
issuersScreenStyles: StyleSheet.create({
IssuersScreenStyles: StyleSheet.create({
issuersSearchBar: {
borderWidth: 1,
borderColor: Colors.Gray50,
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.84,
paddingLeft: 12,
borderLeftWidth: 0,
borderTopRightRadius: 9,
borderBottomRightRadius: 9,
},
searchIcon: {
justifyContent: 'center',
paddingLeft: 15,
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.1,
borderColor: Colors.Gray50,
borderTopWidth: 1,
borderBottomWidth: 1,
borderLeftWidth: 1,
borderTopLeftRadius: 9,
borderBottomLeftRadius: 9,
},
issuerListOuterContainer: {
padding: 10,
flex: 1,
backgroundColor: Colors.White,
},
issuersContainer: {marginHorizontal: 3},
issuersContainer: {
marginHorizontal: 3,
marginTop: 5,
},
issuerBoxContainer: {
margin: 5,
flex: 1,
Expand Down Expand Up @@ -1267,6 +1292,23 @@ export const DefaultTheme = {
maxHeight: Dimensions.get('window').height,
},
}),
BottomTabBarStyle: StyleSheet.create({
headerRightContainerStyle: {paddingEnd: 13},
headerLeftContainerStyle: {paddingEnd: 13},
tabBarLabelStyle: {
fontSize: 12,
fontFamily: 'Inter_600SemiBold',
},
tabBarStyle: {
display: 'flex',
height: 75,
paddingHorizontal: 10,
},
tabBarItemStyle: {
height: 83,
padding: 11,
},
}),

ICON_SMALL_SIZE: 16,
ICON_MID_SIZE: 22,
Expand Down
47 changes: 44 additions & 3 deletions components/ui/themes/PurpleTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,13 +1184,38 @@ export const PurpleTheme = {
backgroundColor: Colors.Transparent,
},
}),
issuersScreenStyles: StyleSheet.create({
IssuersScreenStyles: StyleSheet.create({
issuersSearchBar: {
borderWidth: 1,
borderColor: Colors.Gray50,
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.84,
paddingLeft: 12,
borderLeftWidth: 0,
borderTopRightRadius: 9,
borderBottomRightRadius: 9,
},
searchIcon: {
justifyContent: 'center',
backgroundColor: Colors.Gray50,
height: Dimensions.get('window').height * 0.055,
width: Dimensions.get('window').width * 0.1,
borderColor: Colors.Gray50,
borderTopWidth: 1,
borderBottomWidth: 1,
borderLeftWidth: 1,
borderTopLeftRadius: 9,
borderBottomLeftRadius: 9,
},
issuerListOuterContainer: {
padding: 10,
flex: 1,
backgroundColor: Colors.White,
},
issuersContainer: {marginHorizontal: 3},
issuersContainer: {
marginHorizontal: 3,
marginVertical: 5,
},
issuerBoxContainer: {
margin: 5,
flex: 1,
Expand Down Expand Up @@ -1266,6 +1291,23 @@ export const PurpleTheme = {
maxHeight: Dimensions.get('window').height,
},
}),
BottomTabBarStyle: StyleSheet.create({
headerRightContainerStyle: {paddingEnd: 13},
headerLeftContainerStyle: {paddingEnd: 13},
tabBarLabelStyle: {
fontSize: 12,
fontFamily: 'Inter_600SemiBold',
},
tabBarStyle: {
display: 'flex',
height: 75,
paddingHorizontal: 10,
},
tabBarItemStyle: {
height: 83,
padding: 11,
},
}),

ICON_SMALL_SIZE: 16,
ICON_MID_SIZE: 22,
Expand Down Expand Up @@ -1299,7 +1341,6 @@ export const PurpleTheme = {
protectPrivacy: require('../../../assets/intro-unlock-method.png'),
NoInternetConnection: require('../../../assets/no-internet-connection.png'),
SomethingWentWrong: require('../../../assets/something-went-wrong.png'),

elevation(level: ElevationLevel): ViewStyle {
// https://ethercreative.github.io/react-native-shadow-generator/

Expand Down
Loading

0 comments on commit deddf04

Please sign in to comment.