Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Price provider model #1084

Merged
merged 5 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/renderer/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { useEffect, useState } from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import { useNavigate, useRoutes } from 'react-router-dom';
import { useUnit } from 'effector-react';

import { FallbackScreen } from '@renderer/components/common';
import { useAccount } from '@renderer/entities/account';
import { priceProviderModel, currencyModel } from '@renderer/entities/price';
import {
ConfirmDialogProvider,
I18Provider,
Expand All @@ -22,6 +24,10 @@ const App = () => {
const appRoutes = useRoutes(routesConfig);
const { getAccounts } = useAccount();

const [assetsPrices, activeCurrency] = useUnit([priceProviderModel.$assetsPrices, currencyModel.$activeCurrency]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added temporary, to make effector model work you need to import it somewhere.
Can be deleted after Egor's PR

console.log('🔴 assetsPrices === > ', assetsPrices);
console.log('🔴 currency === > ', activeCurrency);

const [showSplashScreen, setShowSplashScreen] = useState(true);
const [isAccountsLoading, setIsAccountsLoading] = useState(true);

Expand Down
Loading
Loading