Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into inji-435-add-tel…
Browse files Browse the repository at this point in the history
…emetry-events-for-vc-activation-flow

Signed-off-by: PuBHARGAVI <[email protected]>
  • Loading branch information
PuBHARGAVI committed Oct 25, 2023
2 parents c9f4987 + 66061bf commit 4147c0b
Show file tree
Hide file tree
Showing 70 changed files with 954 additions and 657 deletions.
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ MIMOTO_HOST=https://api.qa-inji.mosip.net

ESIGNET_HOST=https://api.qa-inji.mosip.net

GOOGLE_NEARBY_MESSAGES_API_KEY=

OBSRV_HOST = https://dataset-api.obsrv.mosip.net

#Application Theme can be ( orange | purple )
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/android-beta-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ jobs:
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Setup Firebase
run: |
cd android
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
env:
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}

- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/android-build-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,20 +109,6 @@ jobs:
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Setup Firebase
run: |
cd android
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];
then
rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;
else
echo "Using Dummy Google Service JSON for firebase"
echo "$DUMMY_GOOGLE_SERVICE_JSON" > app/google-services.json
fi
env:
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}

- name: Generate keystore
run: |
keytool \
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/android-internal-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,6 @@ jobs:
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Setup Firebase
run: |
cd android
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
env:
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}

- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
Expand Down Expand Up @@ -182,13 +175,6 @@ jobs:
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Setup Firebase
run: |
cd android
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
env:
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}

- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ jobs:
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
APPLICATION_THEME: ${{ github.event.inputs.theme }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ github.event.inputs.internal-testers }}
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ github.event.inputs.buildDescription }}

Expand Down
9 changes: 6 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fileignoreconfig:
- filename: package.json
checksum: fdd5905228a1afbfb004c710fd6c61adf073a12840200327c0592b76bea5e7e3
- filename: package-lock.json
checksum: a4c1fe2521067e1a279610f079446c600e8b7d5cf1553934dc419c3c476b4844
checksum: fc26d97edecbacd0b7507032c6fc1acfcea9f01f5dbe66a2a0341506e2f0daca
- filename: components/PasscodeVerify.tsx
checksum: 14654c0f038979fcd0d260170a45894a072f81e0767ca9a0e66935d33b5cc703
- filename: i18n.ts
Expand Down Expand Up @@ -33,6 +33,11 @@ fileignoreconfig:
checksum: c8d874aa373bdf526bf59192139822f56915e702ef673bac4e0d7549b0fea3d0
- filename: screens/Issuers/IssuersScreen.tsx
checksum: bc12c43ccc27ac04e5763fa6a6ed3cee63e4362ba5666c160b5e53269de924ab
checksum: 9a61cd59a3718adf1f14faf3024fec66a3295ef373878a878a28e5cb1287afaa
- filename: ios/Podfile.lock
checksum: cc123c3e1f04d41b394ceb16843b15c08bac3ba619ae853ff322717739761a85
- filename: ios/Podfile.lock
checksum: cc123c3e1f04d41b394ceb16843b15c08bac3ba619ae853ff322717739761a85
- filename: screens/Home/IntroSlidersScreen.tsx
checksum: 72ef913857448ef05763e52e32356faa2d1f3de8130a1c638d1897f44823031f
- filename: shared/commonUtil.ts
Expand All @@ -51,7 +56,5 @@ fileignoreconfig:
checksum: f1f504bd8c14496ee71f8eb7f40d54411cc05be03347d644dcc2cca187a20678
- filename: machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine.ts
checksum: 237a2640b7db70770d65da67c79f2929581e32f1162517e50b8d37e409f3387d
- filename: machines/store.ts
checksum: 0695d833df9ec1e1f6ae2bd81631630bb1039dec387718acb153bcb843c952cd
- filename: shared/cryptoutil/cryptoUtil.ts
checksum: b785ff3f01ab9530119072c4d38195048bfeee6155c54ea7dd031559acb722f3
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ Create a `.env.local` file using `.env` as your template:

```
MIMOTO_HOST=
GOOGLE_NEARBY_MESSAGES_API_KEY=
```

And `android/local.properties`:

```
GOOGLE_NEARBY_MESSAGES_API_KEY=
```

More info here: [Setup Google Nearby Messages in React](https://github.com/mrousavy/react-native-google-nearby-messages#usage)

### Android
Expand Down
18 changes: 2 additions & 16 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ plugins {
}

apply plugin: "com.android.application"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: "com.facebook.react"

import com.android.build.OutputFile
Expand Down Expand Up @@ -121,7 +119,6 @@ android {

manifestPlaceholders = [
APP_NAME: APP_NAME_RELEASE,
GOOGLE_NEARBY_MESSAGES_API_KEY: "${properties.getProperty('GOOGLE_NEARBY_MESSAGES_API_KEY')}",
appAuthRedirectScheme: 'io.mosip.residentapp.inji'
]
}
Expand Down Expand Up @@ -219,6 +216,7 @@ dependencies {
if (isGifEnabled || isWebpEnabled) {
implementation 'com.facebook.fresco:fresco:2.0.0'
implementation 'com.facebook.fresco:imagepipeline-okhttp3:2.0.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.4.1'
}

if (isGifEnabled) {
Expand Down Expand Up @@ -250,20 +248,8 @@ dependencies {
} else {
implementation jscFlavor
}
// Firebase
implementation 'com.google.firebase:firebase-crashlytics:17.3.1'
implementation 'com.google.firebase:firebase-analytics:18.0.2'
implementation 'com.jakewharton.timber:timber:4.7.1'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: "./eas-build.gradle"

try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
apply from: "./eas-build.gradle"
39 changes: 0 additions & 39 deletions android/app/google-services.json

This file was deleted.

Binary file removed android/app/google-services.json.gpg
Binary file not shown.
Binary file removed android/app/mosip-google-services.json.gpg
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import timber.log.Timber;

import com.facebook.react.bridge.JSIModulePackage;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;

import java.lang.reflect.InvocationTargetException;
import java.util.List;
Expand Down Expand Up @@ -77,36 +75,9 @@ public void onCreate() {
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
}
// Setup Firebase
FirebaseAnalytics.getInstance(this);
Timber.plant(new CrashReportingTree());
ApplicationLifecycleDispatcher.onApplicationCreate(this);
}


/**
* A tree which logs important information for crash reporting.
*/
private static class CrashReportingTree extends Timber.Tree {
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
@Override
protected void log(int priority, String tag, @NonNull String message, Throwable t) {
if (priority == Log.VERBOSE || priority == Log.DEBUG) {
return;
}

crashlytics.setCustomKey("priority", priority);
crashlytics.setCustomKey("tag", tag);
crashlytics.log(message);

if (t != null) {
if (priority == Log.ERROR) {
crashlytics.recordException(t);
}
}
}
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Expand Down
2 changes: 0 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ buildscript {
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
Expand Down
22 changes: 12 additions & 10 deletions components/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { useState } from 'react';
import { Pressable } from 'react-native';
import { Theme } from './ui/styleUtils';
import React, {useState} from 'react';
import {Pressable} from 'react-native';
import {Theme} from './ui/styleUtils';
import Clipboard from '@react-native-clipboard/clipboard';
import { Icon } from 'react-native-elements';
import { Text } from './ui';
import { useTranslation } from 'react-i18next';
import {Icon} from 'react-native-elements';
import {Text} from './ui';
import {useTranslation} from 'react-i18next';

export const CopyButton: React.FC<CopyButtonProps> = ({ content }) => {
const { t } = useTranslation('common');
export const CopyButton: React.FC<CopyButtonProps> = ({content}) => {
const {t} = useTranslation('common');
const [buttonText, setButtonText] = useState(t('clipboard.copy'));

return (
Expand All @@ -22,10 +22,12 @@ export const CopyButton: React.FC<CopyButtonProps> = ({ content }) => {
type={'material'}
name={'file-copy'}
color={Theme.Colors.Icon}
style={{ marginRight: 2 }}
style={{marginRight: 2}}
size={19}
/>
<Text style={Theme.TextStyles.semibold}>{buttonText}</Text>
<Text style={{...Theme.TextStyles.semibold, paddingTop: 3}}>
{buttonText}
</Text>
</Pressable>
);
};
Expand Down
2 changes: 1 addition & 1 deletion components/EditableListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const EditableListItem: React.FC<EditableListItemProps> = props => {
color={Theme.Colors.Icon}
/>
<ListItem.Content>
<ListItem.Title>
<ListItem.Title style={{paddingTop: 3}}>
<Text weight="semibold" color={props.titleColor}>
{props.title}
</Text>
Expand Down
6 changes: 0 additions & 6 deletions components/FaceScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ export const FaceScanner: React.FC<FaceScannerProps> = props => {
</Centered>
</Row>
)}
{/* TODO: remove warning when iOS SDK is ready */}
{isIOS() && (
<Text size="smaller" color={Theme.Colors.textLabel} align="center">
(face-matching in iOS is mocked)
</Text>
)}
</Centered>
</View>
);
Expand Down
1 change: 1 addition & 0 deletions components/MessageOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const MessageOverlay: React.FC<MessageOverlayProps> = props => {
<Column padding="21" crossAlign="center">
{props.title && (
<Text
style={{paddingTop: 3}}
align="center"
weight="bold"
margin="0 0 10 0"
Expand Down
1 change: 0 additions & 1 deletion components/VC/MosipVCItem/MosipVCItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const MosipVCItem: React.FC<
vcMetadata={props.vcMetadata}
verifiableCredential={verifiableCredential}
emptyWalletBindingId={emptyWalletBindingId}
onPress={() => props.onPress(service)}
showOnlyBindedVc={props.showOnlyBindedVc}
/>
<Row style={Theme.Styles.verticalLineWrapper}>
Expand Down
7 changes: 0 additions & 7 deletions components/VC/MosipVCItem/MosipVCItemActivationStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react';
import {useTranslation} from 'react-i18next';
import {Dimensions} from 'react-native';
import {Icon} from 'react-native-elements';
import {ActorRefFrom} from 'xstate';
import {ExistingMosipVCItemMachine} from '../../../machines/VCItemMachine/ExistingMosipVCItem/ExistingMosipVCItemMachine';
import {VerifiableCredential} from '../../../types/VC/ExistingMosipVC/vc';
import {Row, Text} from '../../ui';
import {Theme} from '../../ui/styleUtils';
Expand Down Expand Up @@ -89,13 +87,11 @@ export const MosipVCItemActivationStatus: React.FC<
{props.emptyWalletBindingId ? (
<WalletUnverifiedActivationDetails
verifiableCredential={props.verifiableCredential}
onPress={props.onPress}
/>
) : (
<WalletVerifiedActivationDetails
verifiableCredential={props.verifiableCredential}
showOnlyBindedVc={props.showOnlyBindedVc}
onPress={props.onPress}
/>
)}
</Row>
Expand All @@ -104,18 +100,15 @@ export const MosipVCItemActivationStatus: React.FC<

interface ExistingMosipVCItemActivationStatusProps {
showOnlyBindedVc: boolean;
onPress: (vcRef?: ActorRefFrom<typeof ExistingMosipVCItemMachine>) => void;
verifiableCredential: VerifiableCredential;
emptyWalletBindingId: boolean;
}

interface WalletVerifiedDetailsProps {
showOnlyBindedVc: boolean;
onPress: (vcRef?: ActorRefFrom<typeof ExistingMosipVCItemMachine>) => void;
verifiableCredential: VerifiableCredential;
}

interface WalletUnVerifiedDetailsProps {
onPress: (vcRef?: ActorRefFrom<typeof ExistingMosipVCItemMachine>) => void;
verifiableCredential: VerifiableCredential;
}
Loading

0 comments on commit 4147c0b

Please sign in to comment.