Skip to content

Commit

Permalink
[#84] Remove Google Nearby code and state machine from INJI
Browse files Browse the repository at this point in the history
[#84] Remove Google Nearby code and state machine from INJI
  • Loading branch information
tilak-puli authored Jun 12, 2023
2 parents b63f9a6 + fb2a01b commit 9347a7b
Show file tree
Hide file tree
Showing 44 changed files with 570 additions and 4,069 deletions.
2 changes: 0 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ APPLICATION_THEME=orange

#environment can be changed if it is toggled
CREDENTIAL_REGISTRY_EDIT=true

USE_BLE_SHARE=true
2 changes: 1 addition & 1 deletion android/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MOSIP Resident App</name>
<name>Inji</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
Expand Down
2 changes: 1 addition & 1 deletion components/ActivityLogText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ function getActionLabel(activity: ActivityLog, language: string) {
locale: DateFnsLocale[language],
}),
]
.filter((label) => label.trim() !== '')
.filter((label) => label?.trim() !== '')
.join(' · ');
}
4 changes: 2 additions & 2 deletions ios/Inji.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
LastUpgradeCheck = 1340;
TargetAttributes = {
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = LD7H4CQ5P9;
DevelopmentTeam = F7JDUR6578;
LastSwiftMigration = 1250;
ProvisioningStyle = Automatic;
};
Expand Down Expand Up @@ -306,7 +306,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = LD7H4CQ5P9;
DEVELOPMENT_TEAM = F7JDUR6578;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
Expand Down
49 changes: 10 additions & 39 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,12 @@ PODS:
- React-jsi (= 0.64.4)
- ReactCommon/turbomodule/core (= 0.64.4)
- glog (0.3.5)
- GoogleInterchangeUtilities (1.2.2):
- GoogleSymbolUtilities (~> 1.1)
- GoogleNetworkingUtilities (1.2.2):
- GoogleSymbolUtilities (~> 1.1)
- GoogleSymbolUtilities (1.1.2)
- GoogleUtilitiesLegacy (1.3.2):
- GoogleSymbolUtilities (~> 1.1)
- GzipSwift (5.1.1)
- MMKV (1.2.13):
- MMKVCore (~> 1.2.13)
- MMKVCore (1.2.15)
- mosip-inji-face-sdk (0.1.12):
- React-Core
- NearbyMessages (1.1.1):
- GoogleInterchangeUtilities (~> 1.2)
- GoogleNetworkingUtilities (~> 1.2)
- GoogleSymbolUtilities (~> 1.1)
- GoogleUtilitiesLegacy (~> 1.3)
- Permission-BluetoothPeripheral (3.6.1):
- RNPermissions
- Permission-Camera (3.6.1):
Expand Down Expand Up @@ -280,10 +268,6 @@ PODS:
- React-Core
- react-native-netinfo (7.1.3):
- React-Core
- react-native-openid4vp-ble (0.4.0):
- CrcSwift (~> 0.0.3)
- GzipSwift
- React-Core
- react-native-restart (0.0.24):
- React-Core
- react-native-rsa-native (2.0.5):
Expand All @@ -292,6 +276,10 @@ PODS:
- React-Core
- react-native-secure-key-store (2.0.10):
- React-Core
- react-native-tuvali (0.3.9):
- CrcSwift (~> 0.0.3)
- GzipSwift
- React-Core
- React-perflogger (0.64.4)
- React-RCTActionSheet (0.64.4):
- React-Core/RCTActionSheetHeaders (= 0.64.4)
Expand Down Expand Up @@ -379,9 +367,6 @@ PODS:
- React
- RNVectorIcons (8.1.0):
- React-Core
- smartshare-react-native (0.2.3-beta.2):
- NearbyMessages
- React-Core
- Yoga (1.14.0)
- ZXingObjC/Core (3.6.5)
- ZXingObjC/OneD (3.6.5):
Expand Down Expand Up @@ -433,11 +418,11 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-mmkv-storage (from `../node_modules/react-native-mmkv-storage`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-openid4vp-ble (from `../node_modules/react-native-openid4vp-ble`)
- react-native-restart (from `../node_modules/react-native-restart`)
- react-native-rsa-native (from `../node_modules/react-native-rsa-native`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-secure-key-store (from `../node_modules/react-native-secure-key-store`)
- react-native-tuvali (from `../node_modules/react-native-tuvali`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
Expand All @@ -461,21 +446,15 @@ DEPENDENCIES:
- RNSecureRandom (from `../node_modules/react-native-securerandom`)
- RNSVG (from `../node_modules/react-native-svg`)
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
- "smartshare-react-native (from `../node_modules/@idpass/smartshare-react-native`)"
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
trunk:
- boost-for-react-native
- CrcSwift
- GoogleInterchangeUtilities
- GoogleNetworkingUtilities
- GoogleSymbolUtilities
- GoogleUtilitiesLegacy
- GzipSwift
- MMKV
- MMKVCore
- NearbyMessages
- ZXingObjC

EXTERNAL SOURCES:
Expand Down Expand Up @@ -561,8 +540,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-mmkv-storage"
react-native-netinfo:
:path: "../node_modules/@react-native-community/netinfo"
react-native-openid4vp-ble:
:path: "../node_modules/react-native-openid4vp-ble"
react-native-restart:
:path: "../node_modules/react-native-restart"
react-native-rsa-native:
Expand All @@ -571,6 +548,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-secure-key-store:
:path: "../node_modules/react-native-secure-key-store"
react-native-tuvali:
:path: "../node_modules/react-native-tuvali"
React-perflogger:
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
React-RCTActionSheet:
Expand Down Expand Up @@ -617,8 +596,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-svg"
RNVectorIcons:
:path: "../node_modules/react-native-vector-icons"
smartshare-react-native:
:path: "../node_modules/@idpass/smartshare-react-native"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand Down Expand Up @@ -646,17 +623,12 @@ SPEC CHECKSUMS:
EXUpdates: a83e036243b0f6ece53a8c1cb883b6751c88a5f8
EXUpdatesInterface: a9814f422d3cd6e7cfd260d13c27786148ece20e
FBLazyVector: fa8275d5086566e22a26ddc385ab5772e7f9b1bd
FBReactNativeSpec: 697645f31dc8937f623394e7b6466e92766dec19
FBReactNativeSpec: 83986f2cb6a4046f24310b93812514ab1ccccb72
glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62
GoogleInterchangeUtilities: d5bc4d88d5b661ab72f9d70c58d02ca8c27ad1f7
GoogleNetworkingUtilities: 3edd3a8161347494f2da60ea0deddc8a472d94cb
GoogleSymbolUtilities: 631ee17048aa5e9ab133470d768ea997a5ef9b96
GoogleUtilitiesLegacy: 5501bedec1646bd284286eb5fc9453f7e23a12f4
GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa
MMKV: aac95d817a100479445633f2b3ed8961b4ac5043
MMKVCore: ddf41b9d9262f058419f9ba7598719af56c02cd3
mosip-inji-face-sdk: d5bc0fb66721c25450f92d3297efcb2cf0117271
NearbyMessages: bd9e88f2df7fbab78be58fed58580d5d5bd62cbf
Permission-BluetoothPeripheral: 67708853584bb9208c76d36d0e0ea4eafb97ea5b
Permission-Camera: bf6791b17c7f614b6826019fcfdcc286d3a107f6
Permission-LocationAccuracy: 76df17de5c6b8bc2eee34e61ee92cdd7a864c73d
Expand All @@ -674,11 +646,11 @@ SPEC CHECKSUMS:
React-jsinspector: d4f6973dd474357dbaaf6f52f31ffc713bf3e766
react-native-mmkv-storage: 8ba3c0216a6df283ece11205b442a3e435aec4e5
react-native-netinfo: 42c0965fca99069b92e3f7360ab2d425985e5104
react-native-openid4vp-ble: 8b9ae374aa4cf5f0f6634d32367c1616131da690
react-native-restart: 45c8dca02491980f2958595333cbccd6877cb57e
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
react-native-secure-key-store: 910e6df6bc33cb790aba6ee24bc7818df1fe5898
react-native-tuvali: a6cd8c23e15da3e0fd52c19fbb8f8eac67b1869f
React-perflogger: 5a890ca0911669421b7611661e9b58f91c805f5c
React-RCTActionSheet: bd180e0879f8424a73650c5c28fbef4f3b5b27fb
React-RCTAnimation: 1004d2b4be1f2cedfdc4cb2326adc95b989e6c6b
Expand All @@ -702,10 +674,9 @@ SPEC CHECKSUMS:
RNSecureRandom: 07efbdf2cd99efe13497433668e54acd7df49fef
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
smartshare-react-native: 133dca4c48dea0908649c680701f0948317378c5
Yoga: d1fc3575b8b68891ff5ef3c276daa855e841eb32
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb

PODFILE CHECKSUM: c9f0fe8dbf7e1bc17ab0a1e74d2edd0a76cd4b7f

COCOAPODS: 1.12.1
COCOAPODS: 1.11.3
27 changes: 0 additions & 27 deletions lib/smartshare/index.ts

This file was deleted.

3 changes: 1 addition & 2 deletions locales/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@
"AppMetaData": {
"header": "حول إنجي",
"version": "الإصدار",
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
"useBle": "Powered by BLE"
},
"ProfileScreen": {
"name": "اسم",
Expand Down
3 changes: 1 addition & 2 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@
"AppMetaData": {
"header": "About Inji",
"version": "Version",
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
"useBle": "Powered by BLE"
},
"ProfileScreen": {
"name": "Name",
Expand Down
3 changes: 1 addition & 2 deletions locales/fil.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@
"AppMetaData": {
"header": "Tungkol kay Inji",
"version": "Bersyon",
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
"useBle": "Powered by BLE"
},
"ProfileScreen": {
"name": "Pangalan",
Expand Down
3 changes: 1 addition & 2 deletions locales/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@
"AppMetaData":{
"header": "इंजी के बारे में",
"version": "संस्करण",
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
"useBle": "Powered by BLE"
},
"ProfileScreen": {
"name": "नाम",
Expand Down
3 changes: 1 addition & 2 deletions locales/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@
"AppMetaData": {
"header": "ಇಂಜಿ ಬಗ್ಗೆ",
"version": "ಆವೃತ್ತಿ",
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
"useBle": "Powered by BLE"
},
"ProfileScreen": {
"name": "ಹೆಸರು",
Expand Down
3 changes: 1 addition & 2 deletions locales/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@
"AppMetaData": {
"header": "இன்ஜி பற்றி",
"version": "பதிப்பு",
"useBle": "Powered by BLE",
"useGoogleNearby": "Powered by GoogleNearby"
"useBle": "Powered by BLE"
},
"ProfileScreen": {
"name": "பெயர்",
Expand Down
39 changes: 21 additions & 18 deletions machines/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import { createSettingsMachine, settingsMachine } from './settings';
import { StoreEvents, storeMachine } from './store';
import { createVcMachine, vcMachine } from './vc';
import { createActivityLogMachine, activityLogMachine } from './activityLog';
import { createRequestMachine, requestMachine } from './request';
import * as BLERequest from './openIdBle/request';
import * as BLEScan from './openIdBle/scan';
import { createScanMachine, scanMachine } from './scan';
import {
createRequestMachine,
requestMachine,
} from './bleShare/request/requestMachine';
import { createScanMachine, scanMachine } from './bleShare/scan/scanMachine';
import { createRevokeMachine, revokeVidsMachine } from './revoke';

import { pure, respond } from 'xstate/lib/actions';
import { AppServices } from '../shared/GlobalContext';
import { request } from '../shared/request';
import { isBLEEnabled } from '../lib/smartshare';
import {
changeCrendetialRegistry,
SETTINGS_STORE_KEY,
Expand Down Expand Up @@ -212,19 +212,17 @@ export const appMachine = model.createMachine(
activityLogMachine.id
);

serviceRefs.scan = isBLEEnabled
? spawn(
BLEScan.createScanMachine(serviceRefs),
BLEScan.scanMachine.id
)
: spawn(createScanMachine(serviceRefs), scanMachine.id);
serviceRefs.scan = spawn(
createScanMachine(serviceRefs),
scanMachine.id
);

serviceRefs.request = isBLEEnabled
? spawn(
BLERequest.createRequestMachine(serviceRefs),
BLERequest.requestMachine.id
)
: spawn(createRequestMachine(serviceRefs), requestMachine.id);
if (Platform.OS === 'android') {
serviceRefs.request = spawn(
createRequestMachine(serviceRefs),
requestMachine.id
);
}

serviceRefs.revoke = spawn(
createRevokeMachine(serviceRefs),
Expand All @@ -242,7 +240,11 @@ export const appMachine = model.createMachine(
context.serviceRefs.settings.subscribe(logState);
context.serviceRefs.activityLog.subscribe(logState);
context.serviceRefs.scan.subscribe(logState);
context.serviceRefs.request.subscribe(logState);

if (Platform.OS === 'android') {
context.serviceRefs.request.subscribe(logState);
}

context.serviceRefs.revoke.subscribe(logState);
}
},
Expand Down Expand Up @@ -348,6 +350,7 @@ interface AppInfo {
deviceId: string;
deviceName: string;
}

interface BackendInfo {
application: {
name: string;
Expand Down
Loading

0 comments on commit 9347a7b

Please sign in to comment.