BlueWallet/index.js

33 lines
903 B
JavaScript
Raw Normal View History

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