Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync with valora #70

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions __mocks__/@divvi/react-native-fs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
export const mkdir = jest.fn()
export const moveFile = jest.fn()
export const copyFile = jest.fn()
export const pathForBundle = jest.fn()
export const pathForGroup = jest.fn()
export const getFSInfo = jest.fn()
export const getAllExternalFilesDirs = jest.fn()
export const unlink = jest.fn()
export const exists = jest.fn()
export const stopDownload = jest.fn()
export const resumeDownload = jest.fn()
export const isResumable = jest.fn()
export const stopUpload = jest.fn()
export const completeHandlerIOS = jest.fn()
export const readDir = jest.fn()
export const readDirAssets = jest.fn()
export const existsAssets = jest.fn()
export const readdir = jest.fn()
export const setReadable = jest.fn()
export const stat = jest.fn()
export const readFile = jest.fn()
export const read = jest.fn()
export const readFileAssets = jest.fn()
export const hash = jest.fn()
export const copyFileAssets = jest.fn()
export const copyFileAssetsIOS = jest.fn()
export const copyAssetsVideoIOS = jest.fn()
export const writeFile = jest.fn()
export const appendFile = jest.fn()
export const write = jest.fn()
export const downloadFile = jest.fn()
export const uploadFiles = jest.fn()
export const touch = jest.fn()
export const MainBundlePath = '__MAIN_BUNDLE_PATH__'
export const CachesDirectoryPath = '__CACHES_DIRECTORY_PATH__'
export const DocumentDirectoryPath = '__DOCUMENT_DIRECTORY_PATH__'
export const ExternalDirectoryPath = '__EXTERNAL_DIRECTORY_PATH__'
export const ExternalStorageDirectoryPath = '__EXTERNAL_STORAGE_DIRECTORY_PATH__'
export const TemporaryDirectoryPath = '__TEMPORARY_DIRECTORY_PATH__'
export const LibraryDirectoryPath = '__LIBRARY_DIRECTORY_PATH__'
export const PicturesDirectoryPath = '__PICTURES_DIRECTORY_PATH__'
65 changes: 65 additions & 0 deletions __mocks__/@interaxyz/react-native-keychain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const mockedItems = new Map<string, any>()

const keychainMock = {
SECURITY_LEVEL_ANY: 'MOCK_SECURITY_LEVEL_ANY',
SECURITY_LEVEL_SECURE_SOFTWARE: 'MOCK_SECURITY_LEVEL_SECURE_SOFTWARE',
SECURITY_LEVEL_SECURE_HARDWARE: 'MOCK_SECURITY_LEVEL_SECURE_HARDWARE',
ACCESSIBLE: {
ALWAYS_THIS_DEVICE_ONLY: 'always',
},
SECURITY_RULES: {
NONE: 'none',
},
ACCESS_CONTROL: {
BIOMETRY_CURRENT_SET: 'BiometryCurrentSet',
},
AUTHENTICATION_TYPE: {
BIOMETRICS: 'AuthenticationWithBiometrics',
},
BIOMETRY_TYPE: {
TOUCH_ID: 'TouchID',
FACE_ID: 'FaceID',
FINGERPRINT: 'Fingerprint',
FACE: 'Face',
IRIS: 'Iris',
},
SECURITY_LEVEL: {
SECURE_SOFTWARE: 'SECURE_SOFTWARE',
SECURE_HARDWARE: 'SECURE_HARDWARE',
ANY: 'ANY',
},
STORAGE_TYPE: {
FB: 'MOCK_FacebookConceal',
AES: 'MOCK_KeystoreAESCBC',
AES_CBC: 'MOCK_KeystoreAESCBC',
AES_GCM_NO_AUTH: 'MOCK_KeystoreAESGCM_NoAuth',
AES_GCM: 'MOCK_KeystoreAESGCM',
RSA: 'MOCK_KeystoreRSAECB',
},
setGenericPassword: jest.fn(async (username, password, options) => {
mockedItems.set(options.service, { username, password, options })
return true
}),
getGenericPassword: jest.fn(async (options) => {
const item = mockedItems.get(options.service)
if (!item) {
return null
}
return {
username: item.username,
password: item.password,
}
}),
resetGenericPassword: jest.fn(async (options) => {
return mockedItems.delete(options.service)
}),
getAllGenericPasswordServices: jest.fn(async () => {
return Array.from(mockedItems.keys())
}),
getSupportedBiometryType: () => Promise.resolve('TouchID'),

// Expose for testing purposes
mockedItems,
}

module.exports = keychainMock
3 changes: 2 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: 'kotlin-android'

import com.android.build.OutputFile
import groovy.json.JsonSlurper
Expand Down Expand Up @@ -150,7 +151,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode appVersionCode
versionName "1.103.0"
versionName "1.104.0"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RELEASE_KEY_ALIAS=mobilestack-key-alias

# Setting this manually based on version number until we have this deploying via Cloud Build
# Example: v1.5.1 deployment number 1 = 1005001001 (1 005 001 001)
VERSION_CODE=1021071687
VERSION_CODE=1021071688
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
Expand Down
6 changes: 3 additions & 3 deletions apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
"e2e:test:ios-release": "detox test -c ios.release -l verbose"
},
"dependencies": {
"@divvi/cookies": "^6.2.3",
"@divvi/mobile": "*",
"@divvi/react-native-fs": "^2.20.1",
"@interaxyz/react-native-keychain": "^9.2.2",
"@interaxyz/react-native-webview": "^13.13.4",
"@react-native-async-storage/async-storage": "^2.1.0",
"@react-native-clipboard/clipboard": "^1.15.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/analytics": "19.1.0",
"@react-native-firebase/app": "19.1.0",
"@react-native-firebase/auth": "19.1.0",
Expand Down Expand Up @@ -65,11 +67,9 @@
"react-native-device-info": "^13.2.0",
"react-native-exit-app": "^2.0.0",
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.21.2",
"react-native-haptic-feedback": "^2.3.3",
"react-native-in-app-review": "^4.3.3",
"react-native-keychain": "^8.2.0",
"react-native-launch-arguments": "^4.0.2",
"react-native-linear-gradient": "^2.8.3",
"react-native-localize": "^3.3.0",
Expand Down
8 changes: 4 additions & 4 deletions ios/MobileStack.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 168;
CURRENT_PROJECT_VERSION = 169;
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 ";
Expand All @@ -792,7 +792,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
);
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.103.0;
MARKETING_VERSION = 1.104.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
Expand Down Expand Up @@ -826,7 +826,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 168;
CURRENT_PROJECT_VERSION = 169;
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -851,7 +851,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
);
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.103.0;
MARKETING_VERSION = 1.104.0;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
Expand Down
25 changes: 13 additions & 12 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ PODS:
- React-Core
- react-native-contacts (5.0.0):
- React-Core
- react-native-cookies (6.2.1):
- react-native-cookies (6.2.3):
- React-Core
- react-native-flipper (0.212.0):
- React-Core
Expand Down Expand Up @@ -778,12 +778,13 @@ PODS:
- Firebase/RemoteConfig (= 10.23.0)
- React-Core
- RNFBApp
- RNFS (2.20.0):
- RNFS (2.20.1):
- React-Core
- RNGestureHandler (2.21.2):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- RNKeychain (8.2.0):
- RNKeychain (9.2.2):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- RNLocalize (3.3.0):
- React-Core
Expand Down Expand Up @@ -900,7 +901,7 @@ DEPENDENCIES:
- "react-native-compat (from `../node_modules/@walletconnect/react-native-compat`)"
- react-native-config (from `../node_modules/react-native-config`)
- react-native-contacts (from `../node_modules/react-native-contacts`)
- "react-native-cookies (from `../node_modules/@react-native-cookies/cookies`)"
- "react-native-cookies (from `../node_modules/@divvi/cookies`)"
- react-native-flipper (from `../node_modules/react-native-flipper`)
- react-native-in-app-review (from `../node_modules/react-native-in-app-review`)
- react-native-launch-arguments (from `../node_modules/react-native-launch-arguments`)
Expand Down Expand Up @@ -945,9 +946,9 @@ DEPENDENCIES:
- "RNFBDynamicLinks (from `../node_modules/@react-native-firebase/dynamic-links`)"
- "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)"
- "RNFBRemoteConfig (from `../node_modules/@react-native-firebase/remote-config`)"
- RNFS (from `../node_modules/react-native-fs`)
- "RNFS (from `../node_modules/@divvi/react-native-fs`)"
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNKeychain (from `../node_modules/react-native-keychain`)
- "RNKeychain (from `../node_modules/@interaxyz/react-native-keychain`)"
- RNLocalize (from `../node_modules/react-native-localize`)
- RNPermissions (from `../node_modules/react-native-permissions`)
- RNPersonaInquiry2 (from `../node_modules/react-native-persona`)
Expand Down Expand Up @@ -1076,7 +1077,7 @@ EXTERNAL SOURCES:
react-native-contacts:
:path: "../node_modules/react-native-contacts"
react-native-cookies:
:path: "../node_modules/@react-native-cookies/cookies"
:path: "../node_modules/@divvi/cookies"
react-native-flipper:
:path: "../node_modules/react-native-flipper"
react-native-in-app-review:
Expand Down Expand Up @@ -1166,11 +1167,11 @@ EXTERNAL SOURCES:
RNFBRemoteConfig:
:path: "../node_modules/@react-native-firebase/remote-config"
RNFS:
:path: "../node_modules/react-native-fs"
:path: "../node_modules/@divvi/react-native-fs"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNKeychain:
:path: "../node_modules/react-native-keychain"
:path: "../node_modules/@interaxyz/react-native-keychain"
RNLocalize:
:path: "../node_modules/react-native-localize"
RNPermissions:
Expand Down Expand Up @@ -1269,7 +1270,7 @@ SPEC CHECKSUMS:
react-native-compat: 03e54a7e1a09f56471b0af199867b4edf13de7ca
react-native-config: ea75335a7cca1d3326de1da384227e580a7c082e
react-native-contacts: 5eeeb8bff95a0e1680a11329e15653eb73d29a1d
react-native-cookies: f7772e020f2d61cbbb591cf769ac352b8c1517e6
react-native-cookies: 0613d8218d02d4a8138d100ee077096a267c82f6
react-native-flipper: 03f211cc2af0ecf4b9569f0dddcc3e5d2b2d8201
react-native-in-app-review: b3d1eed3d1596ebf6539804778272c4c65e4a400
react-native-launch-arguments: d4759f7591e2766e6c5ec746b7032429edaf7058
Expand Down Expand Up @@ -1315,9 +1316,9 @@ SPEC CHECKSUMS:
RNFBDynamicLinks: f761317263bd33aa3bced596bdc0f345d53b4c1b
RNFBMessaging: d90c3a9e3da96dc2cf150a01d3aa0a68a3c32501
RNFBRemoteConfig: 1c92f072b1772b91663247b07a711cd4e9e191e8
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
RNFS: e21dbd93b9beabe4649fb73ff29114c18e78d36d
RNGestureHandler: b81313e62e717cc165ea3b99436aa305d04c57b4
RNKeychain: bbe2f6d5cc008920324acb49ef86ccc03d3b38e4
RNKeychain: 91dc223bc77e3bb8576a3c75cdd28863bc2cb26e
RNLocalize: d024afa9204c13885e61dc88b8190651bcaabac9
RNPermissions: 1d002266e43df33d7080d5355a64b7d12bdb5e75
RNPersonaInquiry2: 4202f797d7a172af2908f271954123858abe47bf
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@
},
"//resolutions": "Ensure we use a single version of expo, react, react-native and native dependencies otherwise it can cause issues",
"resolutions": {
"@divvi/cookies": "^6.2.3",
"@divvi/react-native-fs": "^2.20.1",
"@interaxyz/react-native-keychain": "^9.2.2",
"@interaxyz/react-native-webview": "^13.13.4",
"@react-native-async-storage/async-storage": "^2.1.0",
"@react-native-clipboard/clipboard": "^1.15.0",
"@react-native-community/netinfo": "^11.4.1",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/analytics": "19.1.0",
"@react-native-firebase/app": "19.1.0",
"@react-native-firebase/auth": "19.1.0",
Expand Down Expand Up @@ -89,11 +91,9 @@
"react-native-device-info": "^13.2.0",
"react-native-exit-app": "^2.0.0",
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.21.2",
"react-native-haptic-feedback": "^2.3.3",
"react-native-in-app-review": "^4.3.3",
"react-native-keychain": "^8.2.0",
"react-native-launch-arguments": "^4.0.2",
"react-native-linear-gradient": "^2.8.3",
"react-native-localize": "^3.3.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/@divvi/mobile/__mocks__/react-native-keychain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ const keychainMock = {
SECURE_HARDWARE: 'SECURE_HARDWARE',
ANY: 'ANY',
},
STORAGE_TYPE: {
FB: 'MOCK_FacebookConceal',
AES: 'MOCK_KeystoreAESCBC',
AES_CBC: 'MOCK_KeystoreAESCBC',
AES_GCM_NO_AUTH: 'MOCK_KeystoreAESGCM_NoAuth',
AES_GCM: 'MOCK_KeystoreAESGCM',
RSA: 'MOCK_KeystoreRSAECB',
},
setGenericPassword: jest.fn(async (username, password, options) => {
mockedItems.set(options.service, { username, password, options })
return true
Expand Down
5 changes: 5 additions & 0 deletions packages/@divvi/mobile/locales/base/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2873,6 +2873,11 @@
"info": "You are currently viewing the app in demo mode",
"cta": "Exit Demo"
},
"restrictedAccess": {
"title": "In Demo Mode",
"info": "You can't complete this action because you are viewing the app in demo mode",
"cta": "Exit Demo"
},
"inAppIndicatorLabel": "Demo Mode"
}
}
5 changes: 5 additions & 0 deletions packages/@divvi/mobile/locales/de/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,11 @@
"info": "Du siehst die App derzeit im Demo-Modus",
"cta": "Demo beenden"
},
"restrictedAccess": {
"title": "Im Demo-Modus",
"info": "Du kannst diese Aktion nicht abschließen, weil du die App im Demo-Modus betrachtest",
"cta": "Demo beenden"
},
"inAppIndicatorLabel": "Demo-Modus"
},
"celoDollarAmount": "<0></0> Celo Dollar",
Expand Down
5 changes: 5 additions & 0 deletions packages/@divvi/mobile/locales/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,11 @@
"info": "You are currently viewing the app in demo mode",
"cta": "Exit Demo"
},
"restrictedAccess": {
"title": "In Demo Mode",
"info": "You can't complete this action because you are viewing the app in demo mode",
"cta": "Exit Demo"
},
"inAppIndicatorLabel": "Demo Mode"
},
"celoDollarAmount": "<0></0> Celo Dollar",
Expand Down
5 changes: 5 additions & 0 deletions packages/@divvi/mobile/locales/es-419/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,11 @@
"info": "Estás viendo la aplicación en modo demo",
"cta": "Salir de la Demo"
},
"restrictedAccess": {
"title": "En modo Demo",
"info": "No puedes completar esta acción porque estás viendo la app en modo demo",
"cta": "Salir de la Demo"
},
"inAppIndicatorLabel": "Modo Demo"
},
"celoDollarAmount": "<0></0> Celo Dollar",
Expand Down
5 changes: 5 additions & 0 deletions packages/@divvi/mobile/locales/fr-FR/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,11 @@
"info": "Tu visualises actuellement l'appli en mode démo.",
"cta": "Quitter la démo"
},
"restrictedAccess": {
"title": "En mode démo",
"info": "Tu ne peux pas effectuer cette action car tu visualises l'appli en mode démo",
"cta": "Quitter la démo"
},
"inAppIndicatorLabel": "Mode démo"
},
"celoDollarAmount": "<0></0> Celo Dollar",
Expand Down
Loading
Loading