From 6d1dedfd5b4eea5f80ac825703c01906bf6585a5 Mon Sep 17 00:00:00 2001 From: icodezjb <8869892+icodezjb@users.noreply.github.com> Date: Thu, 1 Jun 2023 11:01:10 +0800 Subject: [PATCH 1/5] Add ChainX rpcs Delete SherpaX rpc --- constants/extraRpcs.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/constants/extraRpcs.js b/constants/extraRpcs.js index c217f5cbbb..39918a0954 100644 --- a/constants/extraRpcs.js +++ b/constants/extraRpcs.js @@ -2398,8 +2398,11 @@ export const extraRpcs = { "https://dataserver-asia-2.zenithchain.co/", ], }, - 1506: { - rpcs: ["https://mainnet.sherpax.io/rpc"], + 1501: { + rpcs: [ + "https://mainnet.chainx.org/rpc", + "https://mainnet2.chainx.org/rpc" + ] }, 512512: { rpcs: ["https://galaxy.block.caduceus.foundation"], From 9b7d64e575fe8da99661ab67c8b6a0af3184502d Mon Sep 17 00:00:00 2001 From: icodezjb <8869892+icodezjb@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:29:46 +0800 Subject: [PATCH 2/5] Revert sherpax rpc --- constants/extraRpcs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/constants/extraRpcs.js b/constants/extraRpcs.js index 39918a0954..b84caf6d84 100644 --- a/constants/extraRpcs.js +++ b/constants/extraRpcs.js @@ -2404,6 +2404,9 @@ export const extraRpcs = { "https://mainnet2.chainx.org/rpc" ] }, + 1506: { + rpcs: ["https://mainnet.sherpax.io/rpc"] + }, 512512: { rpcs: ["https://galaxy.block.caduceus.foundation"], }, From c7cc9e64b2ff1f6a3490145b1dc53f6030bb19cf Mon Sep 17 00:00:00 2001 From: icodezjb <8869892+icodezjb@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:31:20 +0800 Subject: [PATCH 3/5] Revert sherpax rpc --- constants/extraRpcs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/extraRpcs.js b/constants/extraRpcs.js index b84caf6d84..a6b87bf272 100644 --- a/constants/extraRpcs.js +++ b/constants/extraRpcs.js @@ -2405,7 +2405,7 @@ export const extraRpcs = { ] }, 1506: { - rpcs: ["https://mainnet.sherpax.io/rpc"] + rpcs: ["https://mainnet.sherpax.io/rpc"], }, 512512: { rpcs: ["https://galaxy.block.caduceus.foundation"], From 9fe85e1134f706b25cb3e320039e97b130a188be Mon Sep 17 00:00:00 2001 From: brenopolanski Date: Fri, 9 Jun 2023 09:57:31 -0300 Subject: [PATCH 4/5] refactor(ad-banner): remove controls and transitions from AdBanner component --- .gitignore | 3 ++ components/AdBanner/index.js | 78 ++++++++---------------------------- pages/index.js | 8 ++-- yarn.lock | 6 +-- 4 files changed, 27 insertions(+), 68 deletions(-) diff --git a/.gitignore b/.gitignore index cb33574d61..4e25d86efc 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ yarn-error.log* # vercel .vercel + +# others +build.log diff --git a/components/AdBanner/index.js b/components/AdBanner/index.js index 8f9ed84525..17530f9686 100755 --- a/components/AdBanner/index.js +++ b/components/AdBanner/index.js @@ -9,65 +9,41 @@ const BANNERS = [ image: "brave.png", name: "Brave", url: "https://brave.com/wallet/?mtm_campaign=q2&mtm_kwd=chainlist", + isActive: true, }, { image: "llamanodes.png", name: "LlamaNodes", url: "https://llamanodes.com", + isActive: true, + }, + { + image: "gmx.png", + name: "GMX", + url: "https://app.gmx.io/#/trade/?ref=chainlist", + isActive: false, }, - // { - // image: "gmx.png", - // name: "GMX", - // url: "https://app.gmx.io/#/trade/?ref=chainlist", - // }, ]; -const randomBanners = shuffleArray(BANNERS); +const randomBanners = shuffleArray(BANNERS.filter((banner) => banner.isActive)); +const currentIndex = 0 -export const AdBanner = ({ timer = 15000, startTransition = true, showControls = false }) => { +export const AdBanner = () => { const t = useTranslations("Common"); const [isMounted, setIsMounted] = useState(false); - const [currentIndex, setCurrentIndex] = useState(0); - // only render the image client-side to prevent hydration errors due to the random banners useEffect(() => { setIsMounted(true); }, []); - useEffect(() => { - const intervalId = setInterval(() => { - if (startTransition) { - return handleNextBanner(); - } - - return; - }, timer); - - return () => clearInterval(intervalId); - }, [currentIndex]); - - const handlePrevBanner = () => { - const isFirstBanner = currentIndex === 0; - const newIndex = isFirstBanner ? randomBanners.length - 1 : currentIndex - 1; - - setCurrentIndex(newIndex); - }; - - const handleNextBanner = () => { - const isLastBanner = currentIndex === randomBanners.length - 1; - const newIndex = isLastBanner ? 0 : currentIndex + 1; - - setCurrentIndex(newIndex); - }; - const srcLarge = `./banners/large/${randomBanners[currentIndex].image}`; const srcSmall = `./banners/small/${randomBanners[currentIndex].image}`; const srcName = randomBanners[currentIndex].name; return (
-
+
@@ -104,26 +80,6 @@ export const AdBanner = ({ timer = 15000, startTransition = true, showControls = {isMounted && {srcName}} - - {/* left arrow */} - {showControls && ( -
- ‹ -
- )} - - {/* right arrow */} - {showControls && ( -
- › -
- )}
diff --git a/pages/index.js b/pages/index.js index f9365d875b..b739c9c60c 100755 --- a/pages/index.js +++ b/pages/index.js @@ -69,10 +69,10 @@ function Home({ chains }) { {filteredChains.map((chain, idx) => { if (idx === 2) { return ( - <> - - - + + + + ) } diff --git a/yarn.lock b/yarn.lock index 8512ebda1f..413497f6c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -752,9 +752,9 @@ camelcase@^7.0.0: integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001426: - version "1.0.30001436" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001436.tgz" - integrity sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg== + version "1.0.30001497" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001497.tgz" + integrity sha512-I4/duVK4wL6rAK/aKZl3HXB4g+lIZvaT4VLAn2rCgJ38jVLb0lv2Xug6QuqmxXFVRJMF74SPPWPJ/1Sdm3vCzw== chalk-template@0.4.0: version "0.4.0" From 8d31b32ec75833597ff37a9ccfc762622c8a5df0 Mon Sep 17 00:00:00 2001 From: Evgeniy Yelagin <91660720+evgeniy-yelagin@users.noreply.github.com> Date: Wed, 7 Jun 2023 19:51:40 +0300 Subject: [PATCH 5/5] Add optimism.meowrpc.com and arbitrum.meowrpc.com --- constants/extraRpcs.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/constants/extraRpcs.js b/constants/extraRpcs.js index a6b87bf272..60f8365a04 100644 --- a/constants/extraRpcs.js +++ b/constants/extraRpcs.js @@ -854,6 +854,11 @@ export const extraRpcs = { tracking: "none", trackingDetails: privacyStatement.publicnode, }, + { + url: "https://arbitrum.meowrpc.com", + tracking: "none", + trackingDetails: privacyStatement.meowrpc, + } ], }, 421613: { @@ -1038,6 +1043,11 @@ export const extraRpcs = { tracking: "none", trackingDetails: privacyStatement.publicnode, }, + { + url: "https://optimism.meowrpc.com", + tracking: "none", + trackingDetails: privacyStatement.meowrpc, + } ], }, 1881: { @@ -2678,4 +2688,4 @@ export const extraRpcs = { const allExtraRpcs = mergeDeep(llamaNodesRpcs, extraRpcs); -export default allExtraRpcs; \ No newline at end of file +export default allExtraRpcs;