mirror of
https://github.com/luxfi/safe-wallet.git
synced 2026-10-30 15:19:21 +00:00
Upstream merge brings 52 commits from safe-global/safe-wallet-monorepo into the luxfi/safe-wallet@dev fork. Conflicts resolved: - yarn.lock: deleted (we are on pnpm) - apps/web/package.json: kept pnpm version + brand build scripts (build:safe / build:lux / build:hanzo) plus upstream's new generate-version.mjs step - apps/mobile/.../Signer/appKit.ts: took upstream's import pattern for shared/projectId, shared/metadata, shared/mmkvStorageAdapter Yarn sweep applied to 42 files (docs, github-actions, workflows, AGENTS, specs, codemods, scripts, READMEs). Net result: zero yarn-* command references anywhere outside node_modules. ❯ pnpm is the law in this fork. No yarn.
218 lines
6.8 KiB
TypeScript
218 lines
6.8 KiB
TypeScript
import { ExpoConfig } from 'expo/config'
|
|
|
|
const IS_DEV = process.env.APP_VARIANT === 'development'
|
|
|
|
const appleDevTeamId = '86487MHG6V'
|
|
|
|
const sslPinningDomains = {
|
|
'safe-client.staging.5afe.dev': [
|
|
'QHATxmJ9BkdBNaheGWDzmef6AvXrsvSm6//NSIir448=', // 🍃 Leaf cert (Valid: Jul 12 00:00:00 2025 GMT → Aug 10 23:59:59 2026 GMT)
|
|
'G9LNNAql897egYsabashkzUCTEJkWBzgoEtk8X/678c=', // 🔗 Intermediate (Valid: Aug 23 22:25:30 2022 GMT → Aug 23 22:25:30 2030 GMT)
|
|
],
|
|
'safe-client.safe.global': [
|
|
'VOstDe9L/YZ7RKPPd7iwAMbsAwCqqblfg3l1IqjUvuE=', // 🍃 Leaf cert (Valid: Jul 12 00:00:00 2025 GMT → Aug 10 23:59:59 2026 GMT)
|
|
'18tkPyr2nckv4fgo0dhAkaUtJ2hu2831xlO2SKhq8dg=', // 🔗 Intermediate cert (Valid: Aug 23 22:25:30 2022 GMT → Aug 23 22:25:30 2030 GMT)
|
|
],
|
|
}
|
|
|
|
// Brand-aware product name. Reads EXPO_PUBLIC_BRAND_NAME at build time so
|
|
// `pnpm build:lux` / `pnpm build:hanzo` produce correctly-branded artifacts
|
|
// without touching this file. Defaults match upstream Safe.
|
|
const brandName = process.env.EXPO_PUBLIC_BRAND_NAME ?? 'Safe{Mobile}'
|
|
const name = IS_DEV ? `Dev-${brandName}` : brandName
|
|
|
|
const config: ExpoConfig = {
|
|
name: name,
|
|
slug: 'safe-mobileapp',
|
|
owner: 'safeglobal',
|
|
version: '1.0.11',
|
|
extra: {
|
|
storybookEnabled: process.env.STORYBOOK_ENABLED,
|
|
eas: {
|
|
projectId: '27e9e907-8675-474d-99ee-6c94e7b83a5c',
|
|
},
|
|
},
|
|
orientation: 'portrait',
|
|
icon: './assets/images/icon.png',
|
|
scheme: 'myapp',
|
|
userInterfaceStyle: 'automatic',
|
|
ios: {
|
|
config: {
|
|
usesNonExemptEncryption: false,
|
|
},
|
|
infoPlist: {
|
|
NSFaceIDUsageDescription: 'Enabling Face ID allows you to create/access secure keys.',
|
|
UIBackgroundModes: ['remote-notification'],
|
|
NSBluetoothPeripheralUsageDescription: 'Allow Bluetooth access to connect to Ledger devices.',
|
|
// Read by react-native-mmkv v4 to place the MMKV store in the App Group container.
|
|
// Renaming this key to anything else (e.g. v3's `AppGroup`) strands data in the old location on upgrade.
|
|
AppGroupIdentifier: IS_DEV ? 'group.global.safe.mobileapp.ios.dev' : 'group.global.safe.mobileapp.ios',
|
|
// https://github.com/expo/expo/issues/39739
|
|
UIDesignRequiresCompatibility: true,
|
|
// https://github.com/react-native-share/react-native-share/issues/1669
|
|
NSPhotoLibraryUsageDescription:
|
|
'This permission is required by third party libraries, but not used in the app. If you ever get prompted for it, deny it & contact support.',
|
|
LSApplicationQueriesSchemes: [
|
|
'metamask',
|
|
'rabby',
|
|
'ledger',
|
|
'coinbase',
|
|
'okx',
|
|
'trust',
|
|
'tokenpocket',
|
|
'phantom',
|
|
'rainbow',
|
|
'zerion',
|
|
'frame',
|
|
'onekey',
|
|
'bitget',
|
|
'safepal',
|
|
'bybit',
|
|
],
|
|
},
|
|
supportsTablet: false,
|
|
appleTeamId: appleDevTeamId,
|
|
bundleIdentifier: IS_DEV ? 'global.safe.mobileapp.ios.dev' : 'global.safe.mobileapp.ios',
|
|
entitlements: {
|
|
'aps-environment': IS_DEV ? 'development' : 'production',
|
|
'com.apple.security.application-groups': [
|
|
IS_DEV ? 'group.global.safe.mobileapp.ios.dev' : 'group.global.safe.mobileapp.ios',
|
|
],
|
|
},
|
|
googleServicesFile: IS_DEV ? process.env.GOOGLE_SERVICES_PLIST_DEV : process.env.GOOGLE_SERVICES_PLIST,
|
|
},
|
|
android: {
|
|
package: IS_DEV ? 'global.safe.mobileapp.dev' : 'global.safe.mobileapp',
|
|
googleServicesFile: IS_DEV ? process.env.GOOGLE_SERVICES_JSON_DEV : process.env.GOOGLE_SERVICES_JSON,
|
|
adaptiveIcon: {
|
|
foregroundImage: './assets/images/android-adaptive-icon-foreground.png',
|
|
backgroundImage: './assets/images/android-adaptive-icon-background.png',
|
|
monochromeImage: './assets/images/android-adaptive-icon-monochrome.png',
|
|
},
|
|
permissions: [
|
|
'android.permission.CAMERA',
|
|
'android.permission.POST_NOTIFICATIONS',
|
|
'android.permission.RECEIVE_BOOT_COMPLETED',
|
|
'android.permission.FOREGROUND_SERVICE',
|
|
'android.permission.WAKE_LOCK',
|
|
],
|
|
allowBackup: false,
|
|
},
|
|
web: {
|
|
bundler: 'metro',
|
|
output: 'static',
|
|
favicon: './assets/images/favicon.png',
|
|
},
|
|
plugins: [
|
|
[
|
|
'expo-datadog',
|
|
{
|
|
errorTracking: {
|
|
iosDsyms: !!process.env.EAS_BUILD,
|
|
iosSourcemaps: !!process.env.EAS_BUILD,
|
|
androidSourcemaps: !!process.env.EAS_BUILD,
|
|
androidProguardMappingFiles: !!process.env.EAS_BUILD,
|
|
},
|
|
},
|
|
],
|
|
[
|
|
'react-native-ble-plx',
|
|
{
|
|
isBackgroundEnabled: false,
|
|
modes: ['central'],
|
|
bluetoothAlwaysPermission: `Allow ${name} to connect to bluetooth devices`,
|
|
},
|
|
],
|
|
['./expo-plugins/withNotificationIcons.js'],
|
|
[
|
|
'./expo-plugins/ssl-pinning/withSSLPinning.js',
|
|
{
|
|
domains: sslPinningDomains,
|
|
},
|
|
],
|
|
'expo-router',
|
|
[
|
|
'expo-font',
|
|
{
|
|
fonts: ['./assets/fonts/safe-icons/safe-icons.ttf'],
|
|
},
|
|
],
|
|
[
|
|
'expo-splash-screen',
|
|
{
|
|
image: './assets/images/icon-dark.png',
|
|
backgroundColor: '#f4f4f4',
|
|
dark: {
|
|
image: './assets/images/icon-light.png',
|
|
backgroundColor: '#121312',
|
|
},
|
|
},
|
|
],
|
|
[
|
|
'react-native-vision-camera',
|
|
{
|
|
cameraPermissionText: `${brandName} needs access to your Camera to scan QR Codes.`,
|
|
enableCodeScanner: true,
|
|
enableLocation: false,
|
|
},
|
|
],
|
|
['./expo-plugins/withDrawableAssets.js', './assets/android/drawable'],
|
|
[
|
|
'expo-build-properties',
|
|
{
|
|
ios: {
|
|
useFrameworks: 'static',
|
|
forceStaticLinking: ['RNFBApp'],
|
|
},
|
|
android: {
|
|
minSdkVersion: 34,
|
|
extraMavenRepos: ['../../../../node_modules/@notifee/react-native/android/libs'],
|
|
},
|
|
},
|
|
],
|
|
'@react-native-firebase/app',
|
|
'@react-native-firebase/messaging',
|
|
'@react-native-firebase/crashlytics',
|
|
[
|
|
'react-native-share',
|
|
{
|
|
ios: ['fb', 'twitter', 'tiktoksharesdk'],
|
|
android: ['com.facebook.katana', 'com.twitter.android', 'com.zhiliaoapp.musically'],
|
|
enableBase64ShareAndroid: true,
|
|
},
|
|
],
|
|
'@react-native-community/datetimepicker',
|
|
'expo-image',
|
|
'expo-task-manager',
|
|
'expo-web-browser',
|
|
[
|
|
'@safe-global/notification-service-ios',
|
|
{
|
|
iosDeploymentTarget: '15.1',
|
|
apsEnvMode: IS_DEV ? 'development' : 'production',
|
|
appleDevTeamId: appleDevTeamId,
|
|
appGroupIdentifier: IS_DEV ? 'group.global.safe.mobileapp.ios.dev' : 'group.global.safe.mobileapp.ios',
|
|
},
|
|
],
|
|
[
|
|
'react-native-capture-protection',
|
|
{
|
|
captureType: 'restrictedCapture',
|
|
},
|
|
],
|
|
[
|
|
'react-native-permissions',
|
|
{
|
|
iosPermissions: ['Bluetooth'],
|
|
},
|
|
],
|
|
'./queries.js',
|
|
],
|
|
experiments: {
|
|
typedRoutes: true,
|
|
reactCompiler: true,
|
|
},
|
|
}
|
|
|
|
export default config
|