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

fix: fix account balances fetching #1068

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
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"big.js": "^6.2.1",
"casper-cep18-js-client": "1.0.2",
"casper-js-sdk": "2.15.4",
"casper-wallet-core": "git+ssh://[email protected]:make-software/casper-wallet-core.git#v0.9.5",
"casper-wallet-core": "git+ssh://[email protected]:make-software/casper-wallet-core.git#v0.9.6",
"date-fns": "^2.30.0",
"i18next": "^23.11.0",
"i18next-browser-languagedetector": "^7.2.1",
Expand Down Expand Up @@ -110,7 +110,7 @@
"@babel/preset-env": "7.23.2",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "^7.23.3",
"@playwright/test": "^1.39.0",
"@playwright/test": "^1.47.2",
"@redux-devtools/cli": "^4.0.0",
"@redux-devtools/remote": "^0.9.3",
"@testing-library/dom": "9.3.4",
Expand Down
10 changes: 7 additions & 3 deletions src/apps/onboarding/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { QueryClientProvider } from '@tanstack/react-query';
import React, { Suspense, useState } from 'react';
import { createRoot } from 'react-dom/client';
import { Provider as ReduxProvider } from 'react-redux';
Expand All @@ -14,6 +15,7 @@ import { onboardingAppInit } from '@background/redux/windowManagement/actions';

import '@libs/i18n/i18n';
import { ErrorBoundary } from '@libs/layout';
import { newQueryClient } from '@libs/services/query-client';
import { GlobalStyle, lightTheme } from '@libs/ui';

const Tree = () => {
Expand All @@ -37,9 +39,11 @@ const Tree = () => {
<ThemeProvider theme={lightTheme}>
<GlobalStyle />
<ReduxProvider store={store}>
<ErrorBoundary>
<AppRouter />
</ErrorBoundary>
<QueryClientProvider client={newQueryClient}>
<ErrorBoundary>
<AppRouter />
</ErrorBoundary>
</QueryClientProvider>
</ReduxProvider>
</ThemeProvider>
</Suspense>
Expand Down
36 changes: 5 additions & 31 deletions src/apps/onboarding/pages/select-accounts-to-recover/content.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Player } from '@lottiefiles/react-lottie-player';
import React, { SetStateAction } from 'react';
import React from 'react';
import { Trans, useTranslation } from 'react-i18next';
import styled from 'styled-components';

Expand All @@ -13,37 +13,20 @@ import {
TabPageContainer,
VerticalSpaceContainer
} from '@libs/layout';
import { AccountListRows } from '@libs/types/account';
import {
DynamicAccountsListWithSelect,
Tile,
Typography
} from '@libs/ui/components';
import { Tile, Typography } from '@libs/ui/components';

const AnimationContainer = styled(CenteredFlexColumn)`
padding: 106px 16px;
`;

interface SelectAccountsToRecoverContentProps {
isLoading: boolean;
derivedAccountsWithBalance: AccountListRows[];
isLoadingMore: boolean;
onLoadMore: () => void;
maxItemsToRender: number;
setSelectedAccounts: React.Dispatch<SetStateAction<AccountListRows[]>>;
selectedAccounts: AccountListRows[];
setIsButtonDisabled: React.Dispatch<SetStateAction<boolean>>;
children: React.ReactNode;
}

export const SelectAccountsToRecoverContent = ({
isLoading,
isLoadingMore,
onLoadMore,
derivedAccountsWithBalance,
maxItemsToRender,
setSelectedAccounts,
selectedAccounts,
setIsButtonDisabled
children
}: SelectAccountsToRecoverContentProps) => {
const { t } = useTranslation();
const isDarkMode = useIsDarkMode();
Expand Down Expand Up @@ -90,16 +73,7 @@ export const SelectAccountsToRecoverContent = ({
</Tile>
</VerticalSpaceContainer>
) : (
<DynamicAccountsListWithSelect
accountsWithBalance={derivedAccountsWithBalance}
isLoadingMore={isLoadingMore}
onLoadMore={onLoadMore}
maxItemsToRender={maxItemsToRender}
setSelectedAccounts={setSelectedAccounts}
selectedAccounts={selectedAccounts}
setIsButtonDisabled={setIsButtonDisabled}
namePrefix="Account"
/>
children
)}
</TabPageContainer>
);
Expand Down
Loading
Loading