2018-12-11 23:52:46 +01:00
|
|
|
import './shim.js';
|
2024-03-31 21:59:14 +02:00
|
|
|
|
|
|
|
import React, { useEffect } from 'react';
|
2020-10-07 14:24:36 +02:00
|
|
|
import { AppRegistry } from 'react-native';
|
2024-03-31 21:59:14 +02:00
|
|
|
|
2019-09-25 05:42:21 +02:00
|
|
|
import App from './App';
|
2020-10-24 19:20:59 +02:00
|
|
|
import { BlueStorageProvider } from './blue_modules/storage-context';
|
2024-03-31 21:59:14 +02:00
|
|
|
import A from './blue_modules/analytics';
|
2024-04-18 03:05:48 +02:00
|
|
|
import { SettingsProvider } from './components/Context/SettingsContext';
|
2024-04-28 00:20:59 +02:00
|
|
|
import { restoreSavedPreferredFiatCurrencyAndExchangeFromStorage } from './blue_modules/currency';
|
2023-04-21 17:39:12 +02:00
|
|
|
|
2018-12-11 23:52:46 +01:00
|
|
|
if (!Error.captureStackTrace) {
|
|
|
|
// captureStackTrace is only available when debugging
|
|
|
|
Error.captureStackTrace = () => {};
|
|
|
|
}
|
|
|
|
|
2020-06-20 06:18:17 +02:00
|
|
|
const BlueAppComponent = () => {
|
|
|
|
useEffect(() => {
|
2024-04-28 00:20:59 +02:00
|
|
|
restoreSavedPreferredFiatCurrencyAndExchangeFromStorage();
|
2019-08-17 21:27:40 +02:00
|
|
|
A(A.ENUM.INIT);
|
2020-06-20 06:18:17 +02:00
|
|
|
}, []);
|
2019-09-20 02:09:33 +02:00
|
|
|
|
2020-10-24 19:20:59 +02:00
|
|
|
return (
|
|
|
|
<BlueStorageProvider>
|
2024-04-18 03:05:48 +02:00
|
|
|
<SettingsProvider>
|
|
|
|
<App />
|
|
|
|
</SettingsProvider>
|
2020-10-24 19:20:59 +02:00
|
|
|
</BlueStorageProvider>
|
|
|
|
);
|
2020-06-20 06:18:17 +02:00
|
|
|
};
|
2018-12-11 23:52:46 +01:00
|
|
|
|
2020-05-19 19:16:30 +02:00
|
|
|
AppRegistry.registerComponent('BlueWallet', () => BlueAppComponent);
|