mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
Fix: update bridge UI dependencies (#165)
* fix: update bridge UI dependencies * fix: remove axios dependency
This commit is contained in:
@@ -20,32 +20,31 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@consensys/linea-sdk": "0.3.0",
|
||||
"@headlessui/react": "2.1.2",
|
||||
"@tanstack/react-query": "5.51.11",
|
||||
"@wagmi/connectors": "5.1.0",
|
||||
"@wagmi/core": "2.13.0",
|
||||
"@web3modal/wagmi": "5.0.8",
|
||||
"axios": "1.7.2",
|
||||
"@headlessui/react": "2.1.9",
|
||||
"@tanstack/react-query": "5.59.3",
|
||||
"@wagmi/connectors": "5.1.15",
|
||||
"@wagmi/core": "2.13.8",
|
||||
"@web3modal/wagmi": "5.1.11",
|
||||
"clsx": "^2.1.1",
|
||||
"compare-versions": "6.1.1",
|
||||
"date-fns": "3.6.0",
|
||||
"framer-motion": "11.3.17",
|
||||
"date-fns": "4.1.0",
|
||||
"framer-motion": "11.11.4",
|
||||
"joi": "17.13.3",
|
||||
"loglevel": "1.9.1",
|
||||
"next": "14.2.5",
|
||||
"next-seo": "6.5.0",
|
||||
"pino-pretty": "11.2.1",
|
||||
"loglevel": "1.9.2",
|
||||
"next": "14.2.15",
|
||||
"next-seo": "6.6.0",
|
||||
"pino-pretty": "11.2.2",
|
||||
"react": "18.3.1",
|
||||
"react-device-detect": "2.2.3",
|
||||
"react-dom": "18.3.1",
|
||||
"react-hook-form": "7.52.1",
|
||||
"react-icons": "5.2.1",
|
||||
"react-hook-form": "7.53.0",
|
||||
"react-icons": "5.3.0",
|
||||
"react-toastify": "10.0.5",
|
||||
"sharp": "0.33.4",
|
||||
"swiper": "11.1.7",
|
||||
"tailwind-merge": "^2.5.2",
|
||||
"viem": "2.18.0",
|
||||
"wagmi": "2.12.0",
|
||||
"sharp": "0.33.5",
|
||||
"swiper": "11.1.14",
|
||||
"tailwind-merge": "^2.5.3",
|
||||
"viem": "2.21.19",
|
||||
"wagmi": "2.12.17",
|
||||
"zustand": "4.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -53,15 +52,15 @@
|
||||
"@svgr/webpack": "^8.1.0",
|
||||
"@synthetixio/synpress": "4.0.0-alpha.7",
|
||||
"@types/fs-extra": "11.0.4",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react": "18.3.11",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"autoprefixer": "10.4.19",
|
||||
"daisyui": "4.12.10",
|
||||
"autoprefixer": "10.4.20",
|
||||
"daisyui": "4.12.12",
|
||||
"dotenv": "16.4.5",
|
||||
"eslint-config-next": "14.2.5",
|
||||
"eslint-config-next": "14.2.15",
|
||||
"eslint-plugin-tailwindcss": "3.17.4",
|
||||
"postcss": "8.4.40",
|
||||
"postcss": "8.4.47",
|
||||
"tailwind-scrollbar": "3.1.0",
|
||||
"tailwindcss": "3.4.7"
|
||||
"tailwindcss": "3.4.13"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export const FooterLinks = ({ toggleMenu }: FooterLinksProps) => (
|
||||
<div className="space-y-2 py-4">
|
||||
<Link
|
||||
className="flex items-center hover:text-primary"
|
||||
href="https://support.linea.build/"
|
||||
href="https://support.linea.build/bridging/how-to-bridge-to-linea"
|
||||
passHref
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import axios, { AxiosResponse } from "axios";
|
||||
import log from "loglevel";
|
||||
import { Address } from "viem";
|
||||
import { GetTokenReturnType, getToken } from "@wagmi/core";
|
||||
@@ -32,27 +31,35 @@ export async function fetchERC20Image(name: string) {
|
||||
throw new Error("Name is required");
|
||||
}
|
||||
|
||||
const coinsResponse: AxiosResponse<CoinGeckoToken[]> = await axios.get(
|
||||
"https://api.coingecko.com/api/v3/coins/list",
|
||||
);
|
||||
const coin = coinsResponse.data.find((coin: CoinGeckoToken) => coin.name === name);
|
||||
const coinsResponse = await fetch("https://api.coingecko.com/api/v3/coins/list");
|
||||
|
||||
if (!coinsResponse.ok) {
|
||||
throw new Error("Error in fetchERC20Image to get coins list");
|
||||
}
|
||||
|
||||
const coinsData: CoinGeckoToken[] = await coinsResponse.json();
|
||||
const coin = coinsData.find((coin: CoinGeckoToken) => coin.name === name);
|
||||
|
||||
if (!coin) {
|
||||
throw new Error("Coin not found");
|
||||
}
|
||||
|
||||
const coinId = coin.id;
|
||||
const coinDataResponse: AxiosResponse<CoinGeckoTokenDetail> = await axios.get(
|
||||
`https://api.coingecko.com/api/v3/coins/${coinId}`,
|
||||
);
|
||||
const coinDataResponse = await fetch(`https://api.coingecko.com/api/v3/coins/${coinId}`);
|
||||
|
||||
if (!coinDataResponse.data.image.small) {
|
||||
if (!coinDataResponse.ok) {
|
||||
throw new Error("Error in fetchERC20Image to get coin data");
|
||||
}
|
||||
|
||||
const coinData: CoinGeckoTokenDetail = await coinDataResponse.json();
|
||||
|
||||
if (!coinData.image.small) {
|
||||
throw new Error("Image not found");
|
||||
}
|
||||
|
||||
const imageUrl = coinDataResponse.data.image.small.split("?")[0];
|
||||
const imageUrl = coinData.image.small.split("?")[0];
|
||||
// Test image URL
|
||||
const response = await axios.get(imageUrl, { timeout: 5000 });
|
||||
const response = await fetch(imageUrl);
|
||||
|
||||
if (response.status !== 200) {
|
||||
return "/images/logo/noTokenLogo.svg";
|
||||
|
||||
1462
pnpm-lock.yaml
generated
1462
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user