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

Production Release #1602

Merged
merged 82 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
d6a6472
feat: Update frontend when new version avialable
oktapodia Nov 27, 2024
628a84c
feat: enable synpress in order to connect metamask with jumper app
bojank93 Dec 2, 2024
69d2568
feat: add yarn.lock file
bojank93 Dec 2, 2024
3352405
fix: modify playwright.yml file to build local env in CI
bojank93 Dec 2, 2024
af7a488
fix: fixing playwright yaml file by adding wait on to make sure local…
bojank93 Dec 2, 2024
957f481
fix: modify playwright config to reuse existing server
bojank93 Dec 2, 2024
1ee0a1c
fix: modify import of json files in e2e tests
bojank93 Dec 2, 2024
47e5dfa
fix: increase number of workers in CI
bojank93 Dec 2, 2024
7eb4cc5
fix: fix number of workers in CI
bojank93 Dec 2, 2024
0ab0614
fix: fix number of workers
bojank93 Dec 2, 2024
da01b28
Merge branch 'develop' into e2e/integrate-synpress
ilijabojanovic Dec 2, 2024
94cc059
increase timeout of jobs
bojank93 Dec 3, 2024
e816218
fix: add more workers in CI
bojank93 Dec 3, 2024
3ee339e
feat: enable sharded tests
bojank93 Dec 4, 2024
ac52fa9
Merge branch 'develop' into e2e/integrate-synpress
bojank93 Dec 4, 2024
c5dd2ae
added building synpress cache
bojank93 Dec 4, 2024
c265ca4
Merge branch 'e2e/integrate-synpress' of https://github.com/jumperexc…
bojank93 Dec 4, 2024
55595e6
fix: improve commands
bojank93 Dec 4, 2024
4bae7d7
fix: move building cache inside test not in CI
bojank93 Dec 4, 2024
99c9de4
fix: delete redundant tests
bojank93 Dec 4, 2024
b178442
fix: increase timeout to 20mins
bojank93 Dec 4, 2024
5f6be6f
fix: remove --force flag from builiding synpress cache command
bojank93 Dec 4, 2024
640c56d
feat: imrpove connect wallet test
bojank93 Dec 4, 2024
09a531b
fix: make connectWallet setup test working in CI
bojank93 Dec 4, 2024
5166178
feat: modify synpressCache function
bojank93 Dec 4, 2024
7a14786
fix: synpressCache function
bojank93 Dec 4, 2024
c151d0f
fix: delete cache-synpress folder if exists
bojank93 Dec 4, 2024
2712102
fix: make sure wallet cache is completed
bojank93 Dec 4, 2024
0026b95
revert changes in synpressCache function
bojank93 Dec 4, 2024
a83fa08
fix: change order of steps inside playwright.yml
bojank93 Dec 4, 2024
707b5f5
fix: delete step for inslling xvfb in CI
bojank93 Dec 4, 2024
db8c022
fix: remove reduntant code
bojank93 Dec 4, 2024
ba365dd
fix: fix typo in yaml file
bojank93 Dec 4, 2024
de7313f
fix: fixing command in package.json
bojank93 Dec 4, 2024
6574830
fix: fix wait-on command
bojank93 Dec 4, 2024
20acafb
fix:change the command for building cache
bojank93 Dec 4, 2024
ec9c5f8
rework playwright yaml file
bojank93 Dec 5, 2024
dc9a0ec
Revert "rework playwright yaml file"
bojank93 Dec 5, 2024
b69e1ec
improve log level in CI
bojank93 Dec 5, 2024
e18031b
fix: increase timeout in wait-on
bojank93 Dec 5, 2024
5b90a7f
fix: reduce number of logs in CI
bojank93 Dec 5, 2024
8f5bfd9
fix: change the order of executing commands in CI
bojank93 Dec 5, 2024
a7ce2a6
fix:add page url in connectWallet test
bojank93 Dec 5, 2024
48a3a03
fix: modify test to include CI commands
bojank93 Dec 5, 2024
d75ee51
Merge branch 'develop' into e2e/integrate-synpress
bojank93 Dec 5, 2024
3377201
fix: delete kill command from playwright file
bojank93 Dec 5, 2024
0be2acc
Merge branch 'e2e/integrate-synpress' of https://github.com/jumperexc…
bojank93 Dec 5, 2024
e83c191
fix: remove running local env from test
bojank93 Dec 6, 2024
2eaf331
fix: modify the command for building cache
bojank93 Dec 6, 2024
4558d7a
fix: improve commands
bojank93 Dec 6, 2024
7657978
fix: add logging
bojank93 Dec 6, 2024
d35a719
fix: remove logs from command
bojank93 Dec 6, 2024
981bf9c
fix typo
bojank93 Dec 6, 2024
075a19f
fix: update the command inside test
bojank93 Dec 6, 2024
7105a0a
fix: fix connect wallet test
bojank93 Dec 6, 2024
756b0a6
feat: add chain of commands in CI for building cache and running tests
bojank93 Dec 9, 2024
9abc568
add command for installing xvfb server
bojank93 Dec 9, 2024
a19ac67
update commadn for installing xvfb server
bojank93 Dec 9, 2024
98eadc8
fix:modify package.json
bojank93 Dec 9, 2024
f7bcb09
fix:add xvfb-run command in command of builiding wallet cache
bojank93 Dec 9, 2024
40c7056
fix: adding xvfb-run into run playwright tests in CI
bojank93 Dec 9, 2024
8738274
fix: include --headless flag in the command for running e2e tests
bojank93 Dec 9, 2024
56a66bb
fix: modify xvfb command
bojank93 Dec 9, 2024
36746a3
fix: increase timeout in CI
bojank93 Dec 9, 2024
a342113
Merge branch 'develop' into e2e/integrate-synpress
bojank93 Dec 9, 2024
0a12093
Merge branch 'e2e/integrate-synpress' of https://github.com/jumperexc…
bojank93 Dec 9, 2024
2ec6968
fix: add click on the ethereum option
bojank93 Dec 9, 2024
34006f3
fix: reduce timeout in CI
bojank93 Dec 9, 2024
1a896e7
feat: enable synpress in order to connect metamask with jumper app
tcheee Dec 9, 2024
4b9ac0e
feat: Update frontend when new version available
tcheee Dec 9, 2024
49cc7b6
chore: bump explorer (#1565)
dennyscode Dec 11, 2024
ac94106
fix: bump packages (#1581)
dennyscode Dec 12, 2024
341a327
Fix: disable update available checker (#1591)
oktapodia Dec 16, 2024
c12ada9
Merge branch 'develop' into staging
tcheee Dec 18, 2024
eee89b4
Develop Release
tcheee Dec 18, 2024
177b574
chore: remove bun lock
chybisov Dec 19, 2024
f314871
feat: update profile page, leaderboard and quest-cards (#1474)
dennyscode Dec 26, 2024
b581896
chore: fix issues with profile page (#1598)
tcheee Dec 27, 2024
ae9cdf9
chore: close wrapped experience but keep banner for future usage
tcheee Jan 2, 2025
f869307
Staging Release
tcheee Jan 2, 2025
e7198dc
chore: change date for past pda update
tcheee Jan 2, 2025
3f3bd99
Staging Release
tcheee Jan 2, 2025
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
3 changes: 2 additions & 1 deletion .github/workflows/build-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ENV_FILE=${{ github.ref_name == 'main' && '.env.production' || github.ref_name == 'develop' && '.env.development' || format('.env.{0}', github.ref_name) }}
ENV_NAME=${{ github.ref_name == 'main' && 'prod' || github.ref_name }}
ENV_NAME=${{ github.ref_name == 'main' && 'prod' || github.ref_name }}
NEXT_PUBLIC_LATEST_COMMIT_SHA={{sha}}
9 changes: 6 additions & 3 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
test:
name: Test (${{ matrix.shard }} / ${{ strategy.job-total}})
continue-on-error: true
timeout-minutes: 10
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -19,16 +19,19 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 18
- name: Install dependencies
run: yarn install
- name: Install xvfb server
run: sudo apt-get install xvfb
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: report-${{ matrix.shard }}.json
run: |
yarn playwright test \
yarn build:cache:ci &
yarn run test:ci:e2e \
--shard ${{ matrix.shard }}/${{ strategy.job-total }} \
--reporter=json
- uses: daun/playwright-report-summary@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ yarn-error.log*

# testing
/coverage
.cache-synpress/**
.tests/snapshots.spec.ts/**


npm-debug.log*
yarn-debug.log*
Expand Down
614 changes: 307 additions & 307 deletions .yarn/releases/yarn-4.5.1.cjs → .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM node:20 AS builder

ARG ENV_NAME
ENV ENV_NAME $ENV_NAME
ARG NEXT_PUBLIC_LATEST_COMMIT_SHA
ENV NEXT_PUBLIC_LATEST_COMMIT_SHA $NEXT_PUBLIC_LATEST_COMMIT_SHA
ENV NEXT_TELEMETRY_DISABLED=1 NODE_ENV=production YARN_VERSION=4.0.1
RUN corepack enable && corepack prepare yarn@${YARN_VERSION}

Expand Down
Binary file removed bun.lockb
Binary file not shown.
87 changes: 47 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,92 +1,95 @@
{
"name": "jumper.exchange",
"version": "1.0.0",
"type": "module",
"private": true,
"repository": "https://github.com/jumperexchange/jumper-exchange",
"packageManager": "[email protected].1",
"packageManager": "[email protected].3",
"dependencies": {
"@bigmi/react": "^0.0.4",
"@emotion/cache": "^11.13.1",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@bigmi/react": "^0.0.6",
"@emotion/cache": "^11.14.0",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fingerprintjs/fingerprintjs": "^3.4.2",
"@headlessui/react": "^2.2.0",
"@lifi/explorer": "^0.0.3",
"@lifi/sdk": "^3.4.1",
"@lifi/wallet-management": "^3.4.4",
"@lifi/widget": "^3.12.1",
"@lifi/explorer": "^0.0.4",
"@lifi/sdk": "^3.4.3",
"@lifi/wallet-management": "^3.4.7",
"@lifi/widget": "^3.12.5",
"@metaplex-foundation/mpl-core": "^1.1.1",
"@metaplex-foundation/umi": "^0.9.2",
"@metaplex-foundation/umi-bundle-defaults": "^0.9.2",
"@metaplex-foundation/umi-signer-wallet-adapters": "^0.9.2",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@mui/material-nextjs": "^5.16.6",
"@next/third-parties": "^14.2.17",
"@rive-app/react-canvas": "^4.16.1",
"@mui/icons-material": "^5.16.11",
"@mui/material": "^5.16.11",
"@mui/material-nextjs": "^5.16.8",
"@next/third-parties": "^14.2.20",
"@rive-app/react-canvas": "^4.17.1",
"@safe-global/safe-apps-sdk": "^9.1.0",
"@sentry/browser": "^8.37.1",
"@sentry/nextjs": "^8.37.1",
"@sentry/react": "^8.37.1",
"@sentry/browser": "^8.43.0",
"@sentry/nextjs": "^8.43.0",
"@sentry/react": "^8.43.0",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-solflare": "^0.6.28",
"@solana/web3.js": "^1.95.4",
"@solana/web3.js": "^1.95.8",
"@strapi/blocks-react-renderer": "^1.0.1",
"@tanstack/react-query": "^5.59.20",
"@tanstack/react-query": "^5.62.7",
"@widgetbot/react-embed": "^1.9.0",
"accept-language": "^3.0.20",
"axios": "^1.7.7",
"blo": "^1.2.0",
"dotenv-cli": "^7.4.2",
"ethers": "^6.13.4",
"fontaine": "^0.5.0",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
"i18next": "^23.16.5",
"i18next": "^24.1.0",
"i18next-resources-for-ts": "^1.5.0",
"i18next-resources-to-backend": "^1.2.1",
"next": "^14.2.17",
"next": "^14.2.20",
"next-i18n-router": "^5.5.1",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-animated-counter": "^1.7.9",
"react-cookie": "^7.2.2",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.1.2",
"react-i18next": "^15.1.1",
"react-i18next": "^15.1.4",
"shallow-equal": "^3.1.0",
"sharp": "^0.33.5",
"siwe": "^2.3.2",
"uuid": "^10.0.0",
"zustand": "^4.5.5"
"uuid": "^11.0.3",
"zustand": "^5.0.2"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@eslint/eslintrc": "^3.1.0",
"@next/eslint-plugin-next": "^14.2.17",
"@playwright/test": "^1.48.2",
"@eslint/eslintrc": "^3.2.0",
"@metamask/test-dapp": "8.13.0",
"@next/eslint-plugin-next": "^14.2.20",
"@playwright/test": "^1.49.1",
"@synthetixio/synpress": "4.0.0-alpha.7",
"@types/gtag.js": "^0.0.20",
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/node": "^22.10.2",
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
"@types/uuid": "^10.0.0",
"dotenv-cli": "^7.4.4",
"eslint": "8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.12.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"globals": "^15.13.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"prettier": "^3.4.2",
"rollup-plugin-polyfill-node": "^0.13.0",
"typescript": "^5.6.3",
"web-vitals": "^4.2.4"
"typescript": "^5.7.2",
"web-vitals": "^4.2.4",
"xvfb": "^0.4.0"
},
"scripts": {
"dev": "next dev",
Expand All @@ -106,7 +109,11 @@
"fix:all-files": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
"pre-commit": "lint-staged",
"pre-push": "yarn && yarn build",
"i18next-resources-for-ts": "i18next-resources-for-ts interface -i ./src/i18n/translations/en -o ./src/i18n/resources.d.ts"
"i18next-resources-for-ts": "i18next-resources-for-ts interface -i ./src/i18n/translations/en -o ./src/i18n/resources.d.ts",
"test:ci:e2e": "xvfb-run --auto-servernum --server-num=1 --server-args='-screen 0, 1920x1080x24' npx playwright test",
"test:e2e-real": "npx playwright test --headed",
"build:cache": "synpress --headless",
"build:cache:ci": "xvfb-run synpress --force tests/wallet-setup/"
},
"lint-staged": {
"**/*.(ts|tsx|js)": [
Expand Down
14 changes: 7 additions & 7 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig, devices } from '@playwright/test';

import { PlaywrightTestConfig } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
Expand All @@ -17,19 +17,19 @@ require('dotenv').config();
// const baseURL = `http://localhost:${PORT}`;

export default defineConfig({
timeout: 60 * 1000,
timeout: 120 * 1000,
expect: {
timeout: 40 * 1000,
timeout: 120 * 1000,
},
testDir: './tests',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 2,
retries: process.env.CI ? 3 : 3,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : 1,
workers: process.env.CI ? 4 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [['html'], ['json', { outputFile: 'test-results.json' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand All @@ -44,7 +44,7 @@ export default defineConfig({
command: 'yarn run dev',
url: 'http://localhost:3000',
timeout: 200 * 1000,
reuseExistingServer: !process.env.CI,
reuseExistingServer: true,
},

/* Configure projects for major browsers */
Expand Down
18 changes: 18 additions & 0 deletions src/app/[lng]/(infos)/leaderboard/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Metadata } from 'next';
import LeaderboardPage from 'src/app/ui/leaderboard/LeaderboardPage';

export const metadata: Metadata = {
title: 'Jumper Leaderboard',
description: 'Jumper Leaderboard is the profile page of Jumper Exchange.',
alternates: {
canonical: `${process.env.NEXT_PUBLIC_SITE_URL}/leaderboard`,
},
};

export default async function Page({
searchParams,
}: {
searchParams: { page?: string };
}) {
return <LeaderboardPage page={searchParams.page} />;
}
5 changes: 1 addition & 4 deletions src/app/[lng]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ export default async function RootLayout({
<SettingsStoreProvider
welcomeScreenClosed={welcomeScreenClosed}
>
<WalletProvider>
<Banner />
{children}
</WalletProvider>
<WalletProvider>{children}</WalletProvider>
</SettingsStoreProvider>
</ThemeProvider>
</NextThemeProvider>
Expand Down
26 changes: 25 additions & 1 deletion src/app/[lng]/meta/%5Fhealth/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,29 @@
const data = { isHealthy: true };

export async function GET() {
return Response.json(data);
let hasUpdateAvailable = false;

return Response.json({ ...data, hasUpdateAvailable });

// Disabled until proper fix
/*try {
const latestCommitSHA = process.env.NEXT_PUBLIC_LATEST_COMMIT_SHA;
const githubLatestCommitShaResponse = await fetch(
`https://api.github.com/repos/jumperexchange/jumper-exchange/commits/${latestCommitSHA}/branches-where-head`,
{ next: { revalidate: 3600 } },
);

if (!githubLatestCommitShaResponse.ok) {
throw new Error('New update available');
}

const githubLatestCommitShaData =
await githubLatestCommitShaResponse.json();

if (githubLatestCommitShaData.length > 0) {
hasUpdateAvailable = false;
}
} finally {
return Response.json({ ...data, hasUpdateAvailable });
}*/
}
4 changes: 2 additions & 2 deletions src/app/api/profile/[walletAddress]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export async function GET(
fill="white"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M13.5 9C13.125 9 12.75 9.375 12.75 9.75V13.5H16.5C18 13.5 18.75 12.375 18.75 11.25C18.75 10.125 18 9 16.5 9H13.5ZM16.5 10.5H14.25V12H16.5C17.0625 12 17.25 11.5261 17.25 11.25C17.25 10.9739 17.0625 10.5 16.5 10.5Z"
fill="white"
/>
Expand Down
2 changes: 2 additions & 0 deletions src/app/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import resourcesToBackend from 'i18next-resources-to-backend';
import { initReactI18next } from 'react-i18next/initReactI18next';
import i18nConfig from '../../i18nconfig';
import { currencyFormatter, decimalFormatter } from '@/utils/formatNumbers';
import { dateFormatter } from 'src/utils/formatDate';

// TODO: use https://nextjs.org/docs/app/building-your-application/routing/internationalization#localization
export default async function initTranslations(
Expand Down Expand Up @@ -41,6 +42,7 @@ export default async function initTranslations(

i18nInstance.services.formatter?.addCached('decimalExt', decimalFormatter);
i18nInstance.services.formatter?.addCached('currencyExt', currencyFormatter);
i18nInstance.services.formatter?.addCached('dateExt', dateFormatter);

return {
i18n: i18nInstance,
Expand Down
11 changes: 11 additions & 0 deletions src/app/ui/leaderboard/LeaderboardPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import { LeaderboardPage as LeaderboardPageComponent } from '@/components/Leaderboard/LeaderboardPage';

const LeaderboardPage = ({ page }: { page?: string }) => {
const parsedPage = parseInt(page || '', 10);
const defaultPage = !isNaN(parsedPage) && parsedPage >= 1 ? parsedPage : 1;

return <LeaderboardPageComponent page={defaultPage} />;
};

export default LeaderboardPage;
2 changes: 1 addition & 1 deletion src/app/ui/quests/QuestMissionPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { QuestsMissionPage } from 'src/components/Quests/QuestPage/QuestsMissionPage';
import { QuestsMissionPage } from 'src/components/QuestPage/QuestsMissionPage';
import { JUMPER_LOYALTY_PATH } from 'src/const/urls';

const QuestPage = ({ quest, url }: any) => {
Expand Down
Loading
Loading