diff --git a/.release/.changeset/bright-impalas-sniff.md b/.release/.changeset/bright-impalas-sniff.md new file mode 100644 index 00000000..11a379bb --- /dev/null +++ b/.release/.changeset/bright-impalas-sniff.md @@ -0,0 +1,6 @@ +--- +"@bnb-chain/canonical-bridge-widget": patch +"@bnb-chain/canonical-bridge-sdk": patch +--- + +Use stargate & meson api to fetch chain & token config diff --git a/.release/.changeset/pre.json b/.release/.changeset/pre.json new file mode 100644 index 00000000..bb5db7f7 --- /dev/null +++ b/.release/.changeset/pre.json @@ -0,0 +1,12 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "@bnb-chain/canonical-bridge-sdk": "0.4.5", + "@bnb-chain/canonical-bridge-widget": "0.5.15" + }, + "changesets": [ + "bright-impalas-sniff", + "serious-cars-worry" + ] +} diff --git a/.release/.changeset/serious-cars-worry.md b/.release/.changeset/serious-cars-worry.md new file mode 100644 index 00000000..910f2f9c --- /dev/null +++ b/.release/.changeset/serious-cars-worry.md @@ -0,0 +1,5 @@ +--- +"@bnb-chain/canonical-bridge-widget": patch +--- + +Add more token info to token element diff --git a/.release/scripts/install.js b/.release/scripts/install.js index a881d541..60b69542 100644 --- a/.release/scripts/install.js +++ b/.release/scripts/install.js @@ -6,7 +6,6 @@ process.chdir(rootDir); console.log('Install changeset dependencies...'); exec('pnpm install', (err, stdout) => { - console.log('shshshshsh'); if (stdout) { console.log(stdout); } diff --git a/.vscode/settings.json b/.vscode/settings.json index e7884581..63ef4b16 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -60,6 +60,7 @@ "tronwallet", "tronweb", "unauthenticate", + "vconsole", "viem", "Wagmi", "walletkit" diff --git a/apps/canonical-bridge-server/.env.example b/apps/canonical-bridge-server/.env.example index db801b5b..58b52e75 100644 --- a/apps/canonical-bridge-server/.env.example +++ b/apps/canonical-bridge-server/.env.example @@ -10,4 +10,4 @@ STARGATE_ENDPOINT='https://mainnet.stargate-api.com/v1/metadata?version=v2' MESON_ENDPOINT=https://relayer.meson.fi/api/v1 REDIS_URL=http://127.0.0.1:6379 -DATABASE_URL=mysql://test:xxx@localhost:3306/bridge +DATABASE_URL= diff --git a/apps/canonical-bridge-server/Dockerfile b/apps/canonical-bridge-server/Dockerfile index 4a18b954..c31451c6 100644 --- a/apps/canonical-bridge-server/Dockerfile +++ b/apps/canonical-bridge-server/Dockerfile @@ -1,9 +1,6 @@ FROM busybox:1.36.1 as builder FROM node:20-buster -RUN useradd -u 9000 appuser -USER appuser - WORKDIR /opt/deploy COPY . . diff --git a/apps/canonical-bridge-ui/core/components/VConsole/index.tsx b/apps/canonical-bridge-ui/core/components/VConsole/index.tsx new file mode 100644 index 00000000..4a9a701b --- /dev/null +++ b/apps/canonical-bridge-ui/core/components/VConsole/index.tsx @@ -0,0 +1,15 @@ +import { useMemo } from 'react'; + +export function VConsole() { + useMemo(async () => { + if (typeof window !== 'undefined') { + try { + new (await import('vconsole')).default(); + } catch (err) { + // eslint-disable-next-line no-console + console.log(`Init vconsole error!`, err); + } + } + }, []); + return null; +} diff --git a/apps/canonical-bridge-ui/package.json b/apps/canonical-bridge-ui/package.json index 01771be5..a70b79cc 100644 --- a/apps/canonical-bridge-ui/package.json +++ b/apps/canonical-bridge-ui/package.json @@ -21,8 +21,8 @@ "@solana/web3.js": "~1.95.4", "@tanstack/react-query": "~5.50.1", "@tronweb3/tronwallet-adapter-react-hooks": "~1.1.9", - "axios": "~1.6.8", - "next": "~14.1.1", + "axios": "~1.7.4", + "next": "~14.2.21", "pino-pretty": "~11.2.1", "polished": "~4.3.1", "react": "~18.3.1", @@ -30,7 +30,8 @@ "supports-color": "~9.4.0", "tronweb": "~6.0.0", "viem": "~2.21.14", - "wagmi": "^2" + "wagmi": "^2", + "vconsole": "~3.15.1" }, "devDependencies": { "@babel/core": "^7.21.4", @@ -51,7 +52,6 @@ "eslint-config-next": "14.2.3", "lint-staged": "~13.0.3", "prettier": "~2.7.1", - "supports-color": "8.1.1", "typescript": "5.5.4" }, "lint-staged": { diff --git a/apps/canonical-bridge-ui/pages/_app.tsx b/apps/canonical-bridge-ui/pages/_app.tsx index 8f21c5c4..a42d224f 100644 --- a/apps/canonical-bridge-ui/pages/_app.tsx +++ b/apps/canonical-bridge-ui/pages/_app.tsx @@ -5,6 +5,7 @@ import { AppProps } from 'next/app'; import { ThemeProvider } from '@/core/components/ThemeProvider'; import { SvgDefs } from '@/core/components/icons/SvgDefs'; +import { VConsole } from '@/core/components/VConsole'; const queryClient = new QueryClient({ defaultOptions: { @@ -19,6 +20,7 @@ const queryClient = new QueryClient({ export default function App({ Component, ...restProps }: AppProps) { return ( <> + diff --git a/apps/canonical-bridge-ui/pages/_document.tsx b/apps/canonical-bridge-ui/pages/_document.tsx index ccd364da..6950a6a6 100644 --- a/apps/canonical-bridge-ui/pages/_document.tsx +++ b/apps/canonical-bridge-ui/pages/_document.tsx @@ -10,16 +10,6 @@ export default class Document extends NextDocument { - -