Skip to content

Commit

Permalink
feat: add utxo support (#1307)
Browse files Browse the repository at this point in the history
Co-authored-by: dennyscode <[email protected]>
Co-authored-by: Denny San <[email protected]>
Co-authored-by: Thomas Cherret <[email protected]>
Co-authored-by: Sébastien BRAMILLE <[email protected]>
  • Loading branch information
5 people authored Oct 8, 2024
1 parent 08ade85 commit 9e46651
Show file tree
Hide file tree
Showing 136 changed files with 2,253 additions and 2,848 deletions.
448 changes: 224 additions & 224 deletions .yarn/releases/yarn-4.4.0.cjs → .yarn/releases/yarn-4.5.0.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.4.0.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
34 changes: 16 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,24 @@
"version": "1.0.0",
"private": true,
"repository": "https://github.com/jumperexchange/jumper-exchange",
"packageManager": "yarn@4.4.0",
"packageManager": "yarn@4.5.0",
"dependencies": {
"@emotion/cache": "^11.13.1",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@fingerprintjs/fingerprintjs": "^3",
"@lifi/explorer": "^0.0.1",
"@lifi/sdk": "^3.2.3",
"@lifi/types": "^15.13.0",
"@lifi/wallet-management": "^3.1.6",
"@lifi/widget": "^3.6.2",
"@fingerprintjs/fingerprintjs": "^3.4.2",
"@lifi/explorer": "^0.0.2",
"@lifi/sdk": "3.3.0-beta.0",
"@lifi/wallet-management": "^3.3.0-beta.7",
"@lifi/widget": "^3.7.0",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@mui/material-nextjs": "^5.16.6",
"@next/third-parties": "^14.2.12",
"@next/third-parties": "^14.2.13",
"@safe-global/safe-apps-sdk": "^9.1.0",
"@sentry/browser": "^8.30.0",
"@sentry/nextjs": "^8.30.0",
"@sentry/react": "^8.30.0",
"@sentry/browser": "^8.32.0",
"@sentry/nextjs": "^8.32.0",
"@sentry/react": "^8.32.0",
"@solana/wallet-adapter-base": "^0.9.23",
"@solana/wallet-adapter-react": "^0.15.35",
"@solana/wallet-adapter-solflare": "^0.6.28",
Expand All @@ -38,15 +37,14 @@
"i18next": "^23.15.1",
"i18next-resources-for-ts": "^1.5.0",
"i18next-resources-to-backend": "^1.2.1",
"next": "^14.2.12",
"next": "^14.2.13",
"next-i18n-router": "^5.5.1",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-cookie": "^7.2.0",
"react-dom": "^18.3.1",
"react-error-boundary": "^4.0.13",
"react-i18next": "^15.0.2",
"react-router-dom": "^6.26.2",
"shallow-equal": "^3.1.0",
"sharp": "^0.33.5",
"siwe": "^2.3.2",
Expand All @@ -57,11 +55,11 @@
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@eslint/eslintrc": "^3.1.0",
"@next/eslint-plugin-next": "^14.2.12",
"@playwright/test": "^1.47.1",
"@next/eslint-plugin-next": "^14.2.13",
"@playwright/test": "^1.47.2",
"@types/gtag.js": "^0.0.20",
"@types/node": "^22.5.5",
"@types/react": "^18.3.7",
"@types/node": "^22.7.4",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10.0.0",
"eslint": "8.57.1",
Expand All @@ -71,7 +69,7 @@
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.9.0",
"husky": "^9.1.6",
Expand Down
1 change: 0 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig, devices } from '@playwright/test';
import { url } from 'inspector';

/**
* Read environment variables from file.
Expand Down
36 changes: 9 additions & 27 deletions src/app/[lng]/(infos)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
import { ThemeProviderV2 } from '@/providers/ThemeProviderV2';
import { ThemeProvider as NextThemeProvider } from 'next-themes';
import { cookies } from 'next/headers';
import React from 'react';
import type { Metadata } from 'next';
import type { PropsWithChildren } from 'react';
import { Layout } from 'src/Layout';

export default async function PartnerThemeLayout({
children,
params: { partnerTheme },
}: {
children: React.ReactNode;
params: { partnerTheme: string };
}) {
const cookiesHandler = cookies();
export const metadata: Metadata = {
other: {
'partner-theme': 'default',
},
};

return (
<NextThemeProvider
themes={['light', 'dark']}
defaultTheme={'system'}
enableSystem
enableColorScheme
>
<ThemeProviderV2
themes={[]}
activeTheme={cookiesHandler.get('theme')?.value || 'system'}
>
<Layout>{children}</Layout>
</ThemeProviderV2>
</NextThemeProvider>
);
export default async function InfosLayout({ children }: PropsWithChildren) {
return <Layout>{children}</Layout>;
}
13 changes: 6 additions & 7 deletions src/app/[lng]/(infos)/learn/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { getArticleBySlug } from '../../../../lib/getArticleBySlug';
import { getArticlesByTag } from '../../../../lib/getArticlesByTag';
import { getCookies } from '../../../../lib/getCookies';
import { getArticles } from '@/app/lib/getArticles';
import { siteName } from '@/app/lib/metadata';
import LearnArticlePage from '@/app/ui/learn/LearnArticlePage';
import type { BlogArticleAttributes, BlogArticleData } from '@/types/strapi';
import type { Metadata } from 'next';
import { sliceStrToXChar } from '@/utils/splitStringToXChar';
import { siteName } from '@/app/lib/metadata';
import { getFeaturedArticle } from '@/app/lib/getFeaturedArticle';
import { getArticles } from '@/app/lib/getArticles';
import type { Metadata } from 'next';
import { getArticleBySlug } from '../../../../lib/getArticleBySlug';
import { getArticlesByTag } from '../../../../lib/getArticlesByTag';
import { getCookies } from '../../../../lib/getCookies';

export async function generateMetadata({
params,
Expand Down
17 changes: 7 additions & 10 deletions src/app/[lng]/(infos)/learn/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
'use server';
import { getArticles } from '@/app/lib/getArticles';
import { getFeaturedArticle } from '@/app/lib/getFeaturedArticle';
import LearnPage from '@/app/ui/learn/LearnPage';
import type { Metadata } from 'next';
import { getTags } from 'src/app/lib/getTags';

export async function generateMetadata(): Promise<Metadata> {
return {
title: 'Jumper Learn',
description: 'Jumper Learn is the blog of Jumper Exchange.',
alternates: {
canonical: `${process.env.NEXT_PUBLIC_SITE_URL}/learn`,
},
};
}
export const metadata: Metadata = {
title: 'Jumper Learn',
description: 'Jumper Learn is the blog of Jumper Exchange.',
alternates: {
canonical: `${process.env.NEXT_PUBLIC_SITE_URL}/learn`,
},
};

// `app/ui/learn/page.tsx` is the UI for the `/learn` URL
export default async function Page() {
Expand Down
16 changes: 7 additions & 9 deletions src/app/[lng]/(infos)/profile/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import type { Metadata } from 'next';
import ProfilePage from '../../../ui/profile/ProfilePage';

export async function generateMetadata(): Promise<Metadata> {
return {
title: 'Jumper Profile',
description: 'Jumper Profile is the profile page of Jumper Exchange.',
alternates: {
canonical: `${process.env.NEXT_PUBLIC_SITE_URL}/profile`,
},
};
}
export const metadata: Metadata = {
title: 'Jumper Profile',
description: 'Jumper Profile is the profile page of Jumper Exchange.',
alternates: {
canonical: `${process.env.NEXT_PUBLIC_SITE_URL}/profile`,
},
};

export default async function Page() {
return <ProfilePage />;
Expand Down
22 changes: 5 additions & 17 deletions src/app/[lng]/(main)/buy/page.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
import { getCookies } from '@/app/lib/getCookies';
import App from '@/app/ui/app/App';
import { OnRamper } from '@/components/OnRamper';
import { Widgets } from '@/components/Widgets';

const Page = () => {
const variant = 'buy';
const { welcomeScreenClosed, activeTheme } = getCookies();
const isWelcomeScreenClosed = welcomeScreenClosed === 'true';
const { activeTheme } = getCookies();

return (
<App
starterVariant={variant}
isWelcomeScreenClosed={isWelcomeScreenClosed}
activeTheme={activeTheme}
>
<OnRamper
isWelcomeScreenClosed={isWelcomeScreenClosed}
activeTheme={activeTheme}
/>
<Widgets
closedWelcomeScreen={isWelcomeScreenClosed}
widgetVariant={variant}
/>
</App>
<>
<OnRamper activeTheme={activeTheme} />
<Widgets widgetVariant={variant} />
</>
);
};

Expand Down
24 changes: 5 additions & 19 deletions src/app/[lng]/(main)/gas/page.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,15 @@
import { getCookies } from '@/app/lib/getCookies';
import App from '@/app/ui/app/App';
import { Widgets } from '@/components/Widgets';
import { Widget } from '@/components/Widgets/Widget';

const Page = () => {
const variant = 'refuel';
const { activeThemeMode, welcomeScreenClosed, activeTheme } = getCookies();
const isWelcomeScreenClosed = welcomeScreenClosed === 'true';

const { activeThemeMode } = getCookies();
return (
<App
starterVariant={variant}
isWelcomeScreenClosed={isWelcomeScreenClosed}
activeTheme={activeTheme}
>
<Widget
starterVariant={variant}
activeThemeMode={activeThemeMode}
isWelcomeScreenClosed={isWelcomeScreenClosed}
/>
<Widgets
closedWelcomeScreen={isWelcomeScreenClosed}
widgetVariant={variant}
/>
</App>
<>
<Widget starterVariant={variant} activeThemeMode={activeThemeMode} />
<Widgets widgetVariant={variant} />
</>
);
};

Expand Down
53 changes: 17 additions & 36 deletions src/app/[lng]/(main)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,24 @@
import React from 'react';
import { getCookies } from '@/app/lib/getCookies';
import { FeatureCards } from '@/components/FeatureCards';
import { getPartnerThemes } from '@/app/lib/getPartnerThemes';
import { cookies } from 'next/headers';
import { ThemeProviderV2 } from '@/providers/ThemeProviderV2';
import type { Metadata } from 'next';
import type { PropsWithChildren } from 'react';
import { Layout } from 'src/Layout';
import { ThemeProvider as NextThemeProvider } from 'next-themes';
import App from '../../ui/app/App';

export default async function MainLayout({
children,
params: { lng },
}: {
children: React.ReactNode;
params: { lng: string };
}) {
const partnerThemes = await getPartnerThemes();
export const metadata: Metadata = {
other: {
'partner-theme': 'default',
},
};

const cookiesHandler = cookies();

const defaultTheme = 'default';

// provider for the theme context, it is used to provide the theme to the whole app, must be into the layout.tsx or page.tsx.
export default async function MainLayout({ children }: PropsWithChildren) {
const { activeTheme } = getCookies();
return (
<NextThemeProvider
themes={[
'dark',
'light',
...partnerThemes.data.map((d) => d.attributes.uid),
]}
defaultTheme={defaultTheme}
enableSystem
enableColorScheme
>
<ThemeProviderV2
activeTheme={cookiesHandler.get('theme')?.value || defaultTheme}
themes={partnerThemes.data}
>
<Layout>{children}</Layout>
<FeatureCards />
</ThemeProviderV2>
</NextThemeProvider>
<>
<Layout>
<App activeTheme={activeTheme}>{children}</App>
</Layout>
<FeatureCards />
</>
);
}
18 changes: 4 additions & 14 deletions src/app/[lng]/(main)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
import { getCookies } from '@/app/lib/getCookies';
import { Widgets } from '@/components/Widgets';
import { Widget } from '@/components/Widgets/Widget';
import App from '../../ui/app/App';

export default function Page() {
const variant = 'default'; // exchange
const { activeThemeMode, activeTheme, welcomeScreenClosed } = getCookies();
const isWelcomeScreenClosed = welcomeScreenClosed === 'true';
const { activeThemeMode, activeTheme } = getCookies();
return (
<App
starterVariant={variant}
isWelcomeScreenClosed={isWelcomeScreenClosed}
activeTheme={activeTheme}
>
<>
<Widget
activeTheme={activeTheme}
starterVariant={variant}
activeThemeMode={activeThemeMode}
isWelcomeScreenClosed={isWelcomeScreenClosed}
/>
<Widgets
closedWelcomeScreen={isWelcomeScreenClosed}
widgetVariant={variant}
/>
</App>
<Widgets widgetVariant={variant} />
</>
);
}
Loading

0 comments on commit 9e46651

Please sign in to comment.