From 30c2a81ee75dfcf0023ef01c0cbe8e5ecad00358 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 29 Oct 2024 14:03:09 +1000 Subject: [PATCH] chore: Update token config file structure --- apps/canonical-bridge-ui/pages/mainnet/index.tsx | 4 ++-- apps/canonical-bridge-ui/pages/testnet/index.tsx | 4 ++-- .../{data => token-config/mainnet}/chains.ts | 0 .../{data => token-config/mainnet}/index.ts | 6 +++--- .../{data => token-config/mainnet}/layerZero/config.json | 0 .../{data => token-config/mainnet}/meson/config.json | 0 .../{data => token-config/mainnet}/stargate/config.json | 0 .../{data-testnet => token-config/testnet}/index.ts | 2 +- .../testnet}/meson/config.json | 0 .../{data-testnet => token-config/testnet}/testnetChains.ts | 0 10 files changed, 8 insertions(+), 8 deletions(-) rename apps/canonical-bridge-ui/{data => token-config/mainnet}/chains.ts (100%) rename apps/canonical-bridge-ui/{data => token-config/mainnet}/index.ts (96%) rename apps/canonical-bridge-ui/{data => token-config/mainnet}/layerZero/config.json (100%) rename apps/canonical-bridge-ui/{data => token-config/mainnet}/meson/config.json (100%) rename apps/canonical-bridge-ui/{data => token-config/mainnet}/stargate/config.json (100%) rename apps/canonical-bridge-ui/{data-testnet => token-config/testnet}/index.ts (92%) rename apps/canonical-bridge-ui/{data-testnet => token-config/testnet}/meson/config.json (100%) rename apps/canonical-bridge-ui/{data-testnet => token-config/testnet}/testnetChains.ts (100%) diff --git a/apps/canonical-bridge-ui/pages/mainnet/index.tsx b/apps/canonical-bridge-ui/pages/mainnet/index.tsx index b139a0b4..68d5e4c3 100644 --- a/apps/canonical-bridge-ui/pages/mainnet/index.tsx +++ b/apps/canonical-bridge-ui/pages/mainnet/index.tsx @@ -5,8 +5,8 @@ import { } from '@bnb-chain/canonical-bridge-widget'; import { en as messages } from '@/core/locales/en'; -import { useTransferConfig } from '@/data'; -import { chains } from '@/data/chains'; +import { useTransferConfig } from '@/token-config/mainnet'; +import { chains } from '@/token-config/mainnet/chains'; import { Layout } from '@/core/components/Layout'; import { env } from '@/core/env'; import { dark } from '@/core/theme/dark'; diff --git a/apps/canonical-bridge-ui/pages/testnet/index.tsx b/apps/canonical-bridge-ui/pages/testnet/index.tsx index 49e6f713..7a3d71d0 100644 --- a/apps/canonical-bridge-ui/pages/testnet/index.tsx +++ b/apps/canonical-bridge-ui/pages/testnet/index.tsx @@ -5,8 +5,8 @@ import { } from '@bnb-chain/canonical-bridge-widget'; import { en as messages } from '@/core/locales/en'; -import { useTestnetTransferConfig } from '@/data-testnet'; -import { testnetChains } from '@/data-testnet/testnetChains'; +import { useTestnetTransferConfig } from '@/token-config/testnet'; +import { testnetChains } from '@/token-config/testnet/testnetChains'; import { Layout } from '@/core/components/Layout'; import { dark } from '@/core/theme/dark'; import { light } from '@/core/theme/light'; diff --git a/apps/canonical-bridge-ui/data/chains.ts b/apps/canonical-bridge-ui/token-config/mainnet/chains.ts similarity index 100% rename from apps/canonical-bridge-ui/data/chains.ts rename to apps/canonical-bridge-ui/token-config/mainnet/chains.ts diff --git a/apps/canonical-bridge-ui/data/index.ts b/apps/canonical-bridge-ui/token-config/mainnet/index.ts similarity index 96% rename from apps/canonical-bridge-ui/data/index.ts rename to apps/canonical-bridge-ui/token-config/mainnet/index.ts index 26ed63ef..db620060 100644 --- a/apps/canonical-bridge-ui/data/index.ts +++ b/apps/canonical-bridge-ui/token-config/mainnet/index.ts @@ -7,9 +7,9 @@ import { import axios from 'axios'; import { env } from '@/core/env'; -import stargateConfig from '@/data/stargate/config.json'; -import layerZeroConfig from '@/data/layerZero/config.json'; -import mesonConfig from '@/data/meson/config.json'; +import stargateConfig from '@/token-config/mainnet/stargate/config.json'; +import layerZeroConfig from '@/token-config/mainnet/layerZero/config.json'; +import mesonConfig from '@/token-config/mainnet/meson/config.json'; export function useTransferConfig() { const [transferConfig, setTransferConfig] = useState(); diff --git a/apps/canonical-bridge-ui/data/layerZero/config.json b/apps/canonical-bridge-ui/token-config/mainnet/layerZero/config.json similarity index 100% rename from apps/canonical-bridge-ui/data/layerZero/config.json rename to apps/canonical-bridge-ui/token-config/mainnet/layerZero/config.json diff --git a/apps/canonical-bridge-ui/data/meson/config.json b/apps/canonical-bridge-ui/token-config/mainnet/meson/config.json similarity index 100% rename from apps/canonical-bridge-ui/data/meson/config.json rename to apps/canonical-bridge-ui/token-config/mainnet/meson/config.json diff --git a/apps/canonical-bridge-ui/data/stargate/config.json b/apps/canonical-bridge-ui/token-config/mainnet/stargate/config.json similarity index 100% rename from apps/canonical-bridge-ui/data/stargate/config.json rename to apps/canonical-bridge-ui/token-config/mainnet/stargate/config.json diff --git a/apps/canonical-bridge-ui/data-testnet/index.ts b/apps/canonical-bridge-ui/token-config/testnet/index.ts similarity index 92% rename from apps/canonical-bridge-ui/data-testnet/index.ts rename to apps/canonical-bridge-ui/token-config/testnet/index.ts index b1a69922..35f9f757 100644 --- a/apps/canonical-bridge-ui/data-testnet/index.ts +++ b/apps/canonical-bridge-ui/token-config/testnet/index.ts @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { ITransferConfig } from '@bnb-chain/canonical-bridge-widget'; -import mesonConfigTestnet from '@/data-testnet/meson/config.json'; +import mesonConfigTestnet from '@/token-config/testnet/meson/config.json'; export function useTestnetTransferConfig() { const [transferConfig, setTransferConfig] = useState(); diff --git a/apps/canonical-bridge-ui/data-testnet/meson/config.json b/apps/canonical-bridge-ui/token-config/testnet/meson/config.json similarity index 100% rename from apps/canonical-bridge-ui/data-testnet/meson/config.json rename to apps/canonical-bridge-ui/token-config/testnet/meson/config.json diff --git a/apps/canonical-bridge-ui/data-testnet/testnetChains.ts b/apps/canonical-bridge-ui/token-config/testnet/testnetChains.ts similarity index 100% rename from apps/canonical-bridge-ui/data-testnet/testnetChains.ts rename to apps/canonical-bridge-ui/token-config/testnet/testnetChains.ts