diff --git a/apps/simple-trading-app-e2e/src/integration/market-trade.test.ts b/apps/simple-trading-app-e2e/src/integration/market-trade.test.ts
index 74d29fab0..859922bc7 100644
--- a/apps/simple-trading-app-e2e/src/integration/market-trade.test.ts
+++ b/apps/simple-trading-app-e2e/src/integration/market-trade.test.ts
@@ -7,18 +7,7 @@ import { generateEstimateOrder } from '../support/mocks/generate-estimate-order'
import { generatePartyBalance } from '../support/mocks/generate-party-balance';
import { generatePartyMarketData } from '../support/mocks/generate-party-market-data';
import { generateMarketMarkPrice } from '../support/mocks/generate-market-mark-price';
-
-const connectVegaWallet = () => {
- const form = 'rest-connector-form';
- const walletName = Cypress.env('TRADING_TEST_VEGA_WALLET_NAME');
- const walletPassphrase = Cypress.env('TRADING_TEST_VEGA_WALLET_PASSPHRASE');
-
- cy.getByTestId('connect-vega-wallet').click();
- cy.getByTestId('connectors-list').find('button').click();
- cy.getByTestId(form).find('#wallet').click().type(walletName);
- cy.getByTestId(form).find('#passphrase').click().type(walletPassphrase);
- cy.getByTestId('rest-connector-form').find('button[type=submit]').click();
-};
+import { connectVegaWallet } from '../support/connect-wallet';
describe('Market trade', () => {
let markets;
diff --git a/apps/simple-trading-app-e2e/src/integration/portfolio-page.test.ts b/apps/simple-trading-app-e2e/src/integration/portfolio-page.test.ts
new file mode 100644
index 000000000..ba80d220b
--- /dev/null
+++ b/apps/simple-trading-app-e2e/src/integration/portfolio-page.test.ts
@@ -0,0 +1,34 @@
+import {
+ connectVegaWallet,
+ disconnectVegaWallet,
+} from '../support/connect-wallet';
+
+describe('Portfolio page', () => {
+ afterEach(() => {
+ disconnectVegaWallet();
+ });
+
+ it('button for wallet connect should work', () => {
+ cy.visit('/');
+ cy.get('[href="/portfolio"]').eq(0).click();
+ cy.getByTestId('connect-vega-wallet-text').should('be.visible');
+ connectVegaWallet();
+ cy.getByTestId('connect-vega-wallet-text').should('not.exist');
+ });
+
+ it('certain tabs should exist', () => {
+ cy.visit('/portfolio');
+ connectVegaWallet();
+ cy.getByTestId('Assets').should('exist');
+ cy.getByTestId('tab-assets').should('exist');
+
+ cy.getByTestId('Positions').click();
+ cy.getByTestId('tab-positions').should('exist');
+
+ cy.getByTestId('Orders').click();
+ cy.getByTestId('tab-orders').should('exist');
+
+ cy.getByTestId('Fills').click();
+ cy.getByTestId('tab-fills').should('exist');
+ });
+});
diff --git a/apps/simple-trading-app-e2e/src/support/connect-wallet.ts b/apps/simple-trading-app-e2e/src/support/connect-wallet.ts
new file mode 100644
index 000000000..473548610
--- /dev/null
+++ b/apps/simple-trading-app-e2e/src/support/connect-wallet.ts
@@ -0,0 +1,16 @@
+export const connectVegaWallet = () => {
+ const form = 'rest-connector-form';
+ const walletName = Cypress.env('TRADING_TEST_VEGA_WALLET_NAME');
+ const walletPassphrase = Cypress.env('TRADING_TEST_VEGA_WALLET_PASSPHRASE');
+
+ cy.getByTestId('connect-vega-wallet').click();
+ cy.getByTestId('connectors-list').find('button').click();
+ cy.getByTestId(form).find('#wallet').click().type(walletName);
+ cy.getByTestId(form).find('#passphrase').click().type(walletPassphrase);
+ cy.getByTestId('rest-connector-form').find('button[type=submit]').click();
+};
+
+export const disconnectVegaWallet = () => {
+ cy.getByTestId('connect-vega-wallet').click();
+ cy.getByTestId('disconnect').click();
+};
diff --git a/apps/simple-trading-app/src/app/app.tsx b/apps/simple-trading-app/src/app/app.tsx
index daf1e5358..74b0487ac 100644
--- a/apps/simple-trading-app/src/app/app.tsx
+++ b/apps/simple-trading-app/src/app/app.tsx
@@ -1,8 +1,9 @@
import { useState, useEffect } from 'react';
+import { useLocation } from 'react-router-dom';
+import { createClient } from './lib/apollo-client';
import { ThemeContext } from '@vegaprotocol/react-helpers';
import { useThemeSwitcher } from '@vegaprotocol/react-helpers';
import { EnvironmentProvider, NetworkLoader } from '@vegaprotocol/environment';
-import { createClient } from './lib/apollo-client';
import {
VegaConnectDialog,
VegaManageDialog,
@@ -13,14 +14,12 @@ import '../styles.scss';
import { AppLoader } from './components/app-loader';
import Header from './components/header';
import { Main } from './components/main';
-import { useLocation } from 'react-router-dom';
+import LocalContext from './context/local-context';
+import useLocalValues from './hooks/use-local-values';
function App() {
+ const localValues = useLocalValues();
const [theme, toggleTheme] = useThemeSwitcher();
- const [vegaWallet, setVegaWallet] = useState({
- connect: false,
- manage: false,
- });
const [menuOpen, setMenuOpen] = useState(false);
const onToggle = () => setMenuOpen(!menuOpen);
@@ -36,28 +35,23 @@ function App() {
+ {t('Connect your Vega wallet')} +
+ +