Skip to content

Commit

Permalink
Merge branch 'develop' into denis/yoext-1076/adding-e2e-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebyt committed May 8, 2024
2 parents 60c2204 + 32624de commit 1d469fb
Show file tree
Hide file tree
Showing 160 changed files with 6,258 additions and 4,073 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/jira.yml

This file was deleted.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
"translations:purge": "lerna run translations:purge -- stream",
"archive:src": "func() { git rev-parse HEAD > COMMIT && git rev-parse --abbrev-ref HEAD > BRANCH && git archive --format zip --add-file COMMIT --add-file BRANCH -o $1 HEAD && rm COMMIT BRANCH; }; func"
},
"husky": {
"hooks": {
"pre-push": ". check-all.sh",
"post-checkout": "npm run translations:purge"
}
},

"devDependencies": {
"concurrently": "^7.0.0",
"husky": "4.3.8",
Expand Down
3 changes: 3 additions & 0 deletions packages/yoroi-extension/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module.exports = {
'react/state-in-constructor': ['warn', 'never'],
'react/jsx-props-no-spreading': 0,
'react/jsx-curly-newline': 0,
'react/jsx-tag-spacing': 0,
'class-methods-use-this': 0,
'no-continue': 0,
'no-duplicate-imports': 0,
Expand Down Expand Up @@ -112,6 +113,8 @@ module.exports = {
{ object: 'TrezorConnect', message: 'Use TrezorWrapper instead to minimize Trezor iframe lifespan', },
],
'import/no-unused-modules': [1, { unusedExports: true }],
'camelcase': 0,
'react/jsx-curly-brace-presence': 0,
},
plugins: [
'import',
Expand Down
2 changes: 1 addition & 1 deletion packages/yoroi-extension/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Routes } from './Routes';
import { locales, translations } from './i18n/translations';
import type { StoresMap } from './stores';
import type { ActionsMap } from './actions';
import { changeToplevelTheme, MuiThemes } from './styles/utils';
import ThemeManager from './ThemeManager';
import environment from './environment';
import MaintenancePage from './containers/MaintenancePage';
Expand All @@ -21,6 +20,7 @@ import { ColorModeProvider } from './styles/context/mode';
import { CssBaseline } from '@mui/material';
import { globalStyles } from './styles/globalStyles';
import Support from './components/widgets/Support';
import { changeToplevelTheme, MuiThemes } from './styles/themes';

// https://github.com/yahoo/react-intl/wiki#loading-locale-data
addLocaleData(locales);
Expand Down
21 changes: 20 additions & 1 deletion packages/yoroi-extension/app/Routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ import SwapPageContainer from './containers/swap/SwapPageContainer';
import AssetsWrapper from './containers/wallet/AssetsWrapper';
import NFTsWrapper from './containers/wallet/NFTsWrapper';
import SwapProvider from './containers/swap/SwapProvider';
import { Stack } from '@mui/material';
import LoadingSpinner from './components/widgets/LoadingSpinner';
import FullscreenLayout from './components/layout/FullscreenLayout';

// PAGES
const LanguageSelectionPagePromise = () => import('./containers/profile/LanguageSelectionPage');
Expand Down Expand Up @@ -131,6 +134,9 @@ const SwapPage = React.lazy(SwapPagePromise);
const SwapOrdersPagePromise = () => import('./containers/swap/orders/OrdersPage');
const SwapOrdersPage = React.lazy(SwapOrdersPagePromise);

const ExchangeEndPagePromise = () => import('./containers/ExchangeEndPage');
const ExchangeEndPage = React.lazy(ExchangeEndPagePromise);

export const LazyLoadPromises: Array<() => any> = [
AddAnotherWalletPromise,
StakingPageContentPromise,
Expand Down Expand Up @@ -172,6 +178,7 @@ export const LazyLoadPromises: Array<() => any> = [
SwapOrdersPagePromise,
OptForAnalyticsPagePromise,
AnalyticsSettingsPagePromise,
ExchangeEndPagePromise,
];

// populated by ConfigWebpackPlugin
Expand Down Expand Up @@ -306,6 +313,11 @@ export const Routes = (stores: StoresMap, actions: ActionsMap): Node => (
path={ROUTES.REVAMP.CATALYST_VOTING}
component={props => <VotingPage {...props} stores={stores} actions={actions} />}
/>
<Route
exact
path={ROUTES.EXCHANGE_END}
component={props => <ExchangeEndPage {...props} stores={stores} actions={actions} />}
/>
<Redirect to={ROUTES.MY_WALLETS} />
</Switch>
</Suspense>
Expand Down Expand Up @@ -464,11 +476,18 @@ const NFTsSubPages = (stores, actions) => (

export function wrapSwap(swapProps: StoresAndActionsProps, children: Node): Node {
const queryClient = new QueryClient();
const loader = (
<FullscreenLayout bottomPadding={0}>
<Stack alignItems="center" justifyContent="center" height="50vh">
<LoadingSpinner />
</Stack>
</FullscreenLayout>
);
return (
<QueryClientProvider client={queryClient}>
<SwapProvider publicDeriver={swapProps.stores.wallets.selected}>
<SwapPageContainer {...swapProps}>
<Suspense fallback={null}>{children}</Suspense>
<Suspense fallback={loader}>{children}</Suspense>
</SwapPageContainer>
</SwapProvider>
</QueryClientProvider>
Expand Down

0 comments on commit 1d469fb

Please sign in to comment.