-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathindex.tsx
65 lines (62 loc) · 2.21 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { createApp } from '@divvi/mobile'
import { registerRootComponent } from 'expo'
import Constants from 'expo-constants'
import Logo from './assets/Logo'
import WelcomeLogo from './assets/WelcomeLogo'
const expoConfig = Constants.expoConfig
if (!expoConfig) {
throw new Error('expoConfig is not available')
}
const App = createApp({
registryName: expoConfig.name,
displayName: expoConfig.name,
deepLinkUrlScheme: expoConfig.scheme as string,
ios: { appStoreId: expoConfig.extra?.appStoreId },
networks: expoConfig.extra?.networks,
features: {
cloudBackup: true,
segment: { apiKey: process.env.EXPO_PUBLIC_SEGMENT_API_KEY! },
sentry: { clientUrl: process.env.EXPO_PUBLIC_SENTRY_CLIENT_URL! },
statsig: { apiKey: process.env.EXPO_PUBLIC_STATSIG_API_KEY! },
walletConnect: { projectId: process.env.EXPO_PUBLIC_WALLET_CONNECT_PROJECT_ID! },
},
themes: {
default: {
assets: {
brandLogo: Logo,
welcomeLogo: WelcomeLogo,
welcomeBackgroundImage: require('./assets/intro-background.png'),
},
},
},
locales: expoConfig.locales ?? {},
screens: {
tabs: ({ defaultTabs }) => {
return {
screens: [defaultTabs.wallet, defaultTabs.activity, defaultTabs.discover],
initialScreen: 'activity',
}
},
},
experimental: {
firebase: expoConfig.extra?.firebaseEnabled ?? false,
alchemyKeys: {
ALCHEMY_ARBITRUM_API_KEY: process.env.EXPO_PUBLIC_ALCHEMY_ARBITRUM_API_KEY!,
ALCHEMY_BASE_API_KEY: process.env.EXPO_PUBLIC_ALCHEMY_BASE_API_KEY!,
ALCHEMY_ETHEREUM_API_KEY: process.env.EXPO_PUBLIC_ALCHEMY_ETHEREUM_API_KEY!,
ALCHEMY_OPTIMISM_API_KEY: process.env.EXPO_PUBLIC_ALCHEMY_OPTIMISM_API_KEY!,
ALCHEMY_POLYGON_POS_API_KEY: process.env.EXPO_PUBLIC_ALCHEMY_POLYGON_POS_API_KEY!,
},
bidali: {
url: process.env.EXPO_PUBLIC_BIDALI_URL!,
},
zendeskConfig: {
apiKey: process.env.EXPO_PUBLIC_ZENDESK_API_KEY!,
projectName: 'valoraapp',
},
},
})
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App)