forked from BlueWallet/BlueWallet
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
34 lines (30 loc) · 1.03 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
import React, { useEffect } from 'react';
import './shim.js';
import { AppRegistry } from 'react-native';
import App from './App';
import { BlueStorageProvider } from './blue_modules/storage-context';
import { WalletContextProvider } from './contexts/wallet.context';
import { DfxSessionContextProvider } from './api/dfx/contexts/session.context';
import { LanguageContextProvider } from './api/dfx/contexts/language.context';
const A = require('./blue_modules/analytics');
if (!Error.captureStackTrace) {
// captureStackTrace is only available when debugging
Error.captureStackTrace = () => {};
}
const BlueAppComponent = () => {
useEffect(() => {
A(A.ENUM.INIT);
}, []);
return (
<BlueStorageProvider>
<WalletContextProvider>
<LanguageContextProvider>
<DfxSessionContextProvider>
<App />
</DfxSessionContextProvider>
</LanguageContextProvider>
</WalletContextProvider>
</BlueStorageProvider>
);
};
AppRegistry.registerComponent('BlueWallet', () => BlueAppComponent);