-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
46 lines (37 loc) · 1.6 KB
/
index.js
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
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
// This file has been auto-generated by Ξ create-react-native-dapp Ξ.
// Feel free to modify it, but please take care to maintain the exact
// procedure listed between /* dapp-begin */ and /* dapp-end */, as
// this will help persist a known template for future migrations.
/* dapp-begin */
const { Platform, LogBox } = require('react-native');
if (Platform.OS !== 'web') {
require('react-native-get-random-values');
LogBox.ignoreLogs(
[
"Warning: The provided value 'ms-stream' is not a valid 'responseType'.",
"Warning: The provided value 'moz-chunked-arraybuffer' is not a valid 'responseType'.",
],
);
}
if (typeof Buffer === 'undefined') {
global.Buffer = require('buffer').Buffer;
}
global.btoa = global.btoa || require('base-64').encode;
global.atob = global.atob || require('base-64').decode;
process.version = 'v9.40';
const { registerRootComponent, scheme } = require('expo');
const { default: App } = require('./frontend/App');
const { default: AsyncStorage } = require('@react-native-async-storage/async-storage');
const { withWalletConnect } = require('@walletconnect/react-native-dapp');
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in the Expo client or in a native build,
// the environment is set up appropriately
registerRootComponent(withWalletConnect(App, {
redirectUrl: Platform.OS === 'web' ? window.location.origin : `${scheme}://`,
storageOptions: {
asyncStorage: AsyncStorage,
},
}));
/* dapp-end */