Skip to content

Commit 9316c57

Browse files
Merge pull request #84 from StabilityNexus/Frontend
Minor fixes
2 parents 75a2f33 + aa806a3 commit 9316c57

11 files changed

Lines changed: 84 additions & 79 deletions

File tree

web/src/app/[cat]/InteractionClient.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ import { SupportedChainId } from "@/utils/indexedDB";
2626

2727
// Chain names mapping
2828
const CHAIN_NAMES: Record<SupportedChainId, string> = {
29-
137: "Polygon",
30-
534351: "Scroll Sepolia",
29+
// 137: "Polygon",
30+
// 534351: "Scroll Sepolia",
3131
5115: "Citrea Testnet",
32-
61: "Ethereum Classic",
33-
8453: "Base"
32+
// 61: "Ethereum Classic",
33+
// 8453: "Base"
3434
};
3535

3636

@@ -237,7 +237,8 @@ export default function InteractionClient() {
237237

238238
// Type guard for chain ID validation
239239
const isValidChainId = useCallback((chainId: number): chainId is SupportedChainId => {
240-
const validChainIds: SupportedChainId[] = [ 137, 534351, 5115, 61, 8453];
240+
// const validChainIds: SupportedChainId[] = [ 137, 534351, 5115, 61, 8453];
241+
const validChainIds: SupportedChainId[] = [ 5115];
241242
return validChainIds.includes(chainId as SupportedChainId);
242243
}, []);
243244

web/src/app/create/page.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,23 @@ import { ButtonLoadingState } from "@/components/ui/button-loading-state";
2222
import { getPublicClient } from "@wagmi/core";
2323

2424
// Define supported chain IDs and names
25-
type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453;
25+
// type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453;
26+
type SupportedChainId = 5115;
2627

2728
const CHAIN_NAMES: Record<SupportedChainId, string> = {
28-
137: "Polygon",
29-
534351: "Scroll Sepolia",
29+
// 137: "Polygon",
30+
// 534351: "Scroll Sepolia",
3031
5115: "Citrea Testnet",
31-
61: "Ethereum Classic",
32-
8453: "Base Mainnet",
32+
// 61: "Ethereum Classic",
33+
// 8453: "Base Mainnet",
3334
};
3435

3536
const CHAIN_COLORS: Record<SupportedChainId, string> = {
36-
137: "bg-purple-500",
37-
534351: "bg-orange-500",
37+
// 137: "bg-purple-500",
38+
// 534351: "bg-orange-500",
3839
5115: "bg-yellow-500",
39-
61: "bg-green-500",
40-
8453: "bg-blue-500",
40+
// 61: "bg-green-500",
41+
// 8453: "bg-blue-500",
4142
};
4243

4344
interface DeployContractProps {

web/src/app/my-cats/page.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ import toast from "react-hot-toast";
2424

2525
// Chain ID to name mapping
2626
const CHAIN_NAMES: Record<SupportedChainId, string> = {
27-
137: "Polygon",
28-
534351: "Scroll Sepolia",
27+
// 137: "Polygon",
28+
// 534351: "Scroll Sepolia",
2929
5115: "Citrea Testnet",
30-
61: "Ethereum Classic",
31-
8453: "Base Mainnet",
30+
// 61: "Ethereum Classic",
31+
// 8453: "Base Mainnet",
3232
};
3333

3434
// Chain colors for visual distinction
3535
const CHAIN_COLORS: Record<SupportedChainId, string> = {
36-
137: "bg-purple-500",
37-
534351: "bg-orange-500",
36+
// 137: "bg-purple-500",
37+
// 534351: "bg-orange-500",
3838
5115: "bg-yellow-500",
39-
61: "bg-green-500",
40-
8453: "bg-blue-500",
39+
// 61: "bg-green-500",
40+
// 8453: "bg-blue-500",
4141
};
4242

4343
interface CatDetails {
@@ -60,7 +60,8 @@ interface PaginationInfo {
6060
const isValidChainId = (
6161
chainId: number | string
6262
): chainId is SupportedChainId => {
63-
const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453];
63+
// const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453];
64+
const validChainIds: SupportedChainId[] = [5115];
6465
return validChainIds.includes(Number(chainId) as SupportedChainId);
6566
};
6667

web/src/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import { showTransactionToast } from "@/components/ui/transaction-toast"
2121

2222

2323
const supportedChains = [
24-
{ id: "534351", name: "Scroll Sepolia" },
24+
// { id: "534351", name: "Scroll Sepolia" },
2525
{ id: "5115", name: "Citrea Testnet" },
26-
{ id: "61", name: "Ethereum Classic" },
27-
{ id: "8453", name: "Base Mainnet" },
28-
{ id: "137", name: "Polygon Mainnet" },
26+
// { id: "61", name: "Ethereum Classic" },
27+
// { id: "8453", name: "Base Mainnet" },
28+
// { id: "137", name: "Polygon Mainnet" },
2929
];
3030

3131
const contact_links = [

web/src/components/ChainDropdown.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ import { motion, AnimatePresence } from "framer-motion";
55
import { ChevronDown, Check, Network } from "lucide-react";
66

77
// Define supported chain IDs
8-
type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453;
8+
// type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453;
9+
type SupportedChainId = 5115;
910

1011
// Chain ID to name mapping
1112
const CHAIN_NAMES: Record<SupportedChainId, string> = {
12-
137: "Polygon",
13-
534351: "Scroll Sepolia",
13+
// 137: "Polygon",
14+
// 534351: "Scroll Sepolia",
1415
5115: "Citrea Testnet",
15-
61: "Ethereum Classic",
16-
8453: "Base Mainnet",
16+
// 61: "Ethereum Classic",
17+
// 8453: "Base Mainnet",
1718
};
1819

1920
// Chain colors for visual distinction
2021
const CHAIN_COLORS: Record<SupportedChainId, string> = {
21-
137: "bg-purple-500",
22-
534351: "bg-orange-500",
22+
// 137: "bg-purple-500",
23+
// 534351: "bg-orange-500",
2324
5115: "bg-yellow-500",
24-
61: "bg-green-500",
25-
8453: "bg-blue-500",
25+
// 61: "bg-green-500",
26+
// 8453: "bg-blue-500",
2627
};
2728

2829
interface ChainDropdownProps {
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
import { defineChain } from "viem";
1+
// import { defineChain } from "viem";
22

3-
export const ethereumClassic = defineChain({
4-
id: 61,
5-
name: "Ethereum Classic",
6-
network: "ethereumClassic",
7-
nativeCurrency: {
8-
name: "Ethereum Classic",
9-
symbol: "ETC",
10-
decimals: 18,
11-
},
12-
rpcUrls: {
13-
default: {
14-
http: ["https://etc.rivet.link"],
15-
},
16-
public: {
17-
http: ["https://etc.rivet.link"],
18-
},
19-
},
20-
blockExplorers: {
21-
default: {
22-
name: "BlockScout",
23-
url: "https://blockscout.com/etc/mainnet",
24-
},
25-
},
26-
});
3+
// export const ethereumClassic = defineChain({
4+
// id: 61,
5+
// name: "Ethereum Classic",
6+
// network: "ethereumClassic",
7+
// nativeCurrency: {
8+
// name: "Ethereum Classic",
9+
// symbol: "ETC",
10+
// decimals: 18,
11+
// },
12+
// rpcUrls: {
13+
// default: {
14+
// http: ["https://etc.rivet.link"],
15+
// },
16+
// public: {
17+
// http: ["https://etc.rivet.link"],
18+
// },
19+
// },
20+
// blockExplorers: {
21+
// default: {
22+
// name: "BlockScout",
23+
// url: "https://blockscout.com/etc/mainnet",
24+
// },
25+
// },
26+
// });

web/src/utils/address.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export const ClowderVaultFactories = {
2-
534351: "0x9551a49da35158c97b5c7857b5ef46223c71e9e1",
2+
// 534351: "0x9551a49da35158c97b5c7857b5ef46223c71e9e1",
33
5115: "0x90070eD69ED51f606b899f5bB9069157Dec4A400",
4-
61: "0x6300F69Ff4Bf96EB4AaD8bf99ee82D8f1a19Bb0F",
5-
137: "0x562a404f844ea6097bd84feb005bd6f420d3640e",
6-
8453: "0x553859a7e3f8841aed994a2a131ebfb38aa9dc10",
4+
// 61: "0x6300F69Ff4Bf96EB4AaD8bf99ee82D8f1a19Bb0F",
5+
// 137: "0x562a404f844ea6097bd84feb005bd6f420d3640e",
6+
// 8453: "0x553859a7e3f8841aed994a2a131ebfb38aa9dc10",
77
} as {
88
[key: number]: `0x${string}`;
99
};

web/src/utils/catExplorer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ export const catExplorer = (hash: `0x${string}`, chainId: number): string => {
33
1: "https://etherscan.io/address/",
44
137: "https://polygonscan.com/address/",
55
534351: "https://sepolia.scrollscan.com/address/",
6-
5115: "https://explorer.testnet.mantle.xyz/address/",
7-
61: "https://explorer.testnet.rsk.co/address/",
6+
5115: "https://explorer.testnet.citrea.xyz/address/",
7+
61: "https://etc.blockscout.com/address/",
88
2001: "https://explorer.testnet.milkomeda.com/address/",
99
8453: "https://basescan.org/address/",
1010
84531: "https://goerli.basescan.org/address/",

web/src/utils/config.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import {
2-
polygon,
3-
scrollSepolia,
4-
base,
2+
// polygon,
3+
// scrollSepolia,
4+
// base,
55
} from "wagmi/chains";
66
import {
77
getDefaultConfig,
88
} from "@rainbow-me/rainbowkit";
99
import { citreaTestnet } from "@/components/CitreaTestnet";
10-
import { ethereumClassic } from "@/components/EthereumClassic";
10+
// import { ethereumClassic } from "@/components/EthereumClassic";
1111

1212
export const config = getDefaultConfig({
1313
appName: "clowder",
1414
projectId: process.env.NEXT_PUBLIC_PROJECT_ID ?? "",
1515
chains: [
16-
scrollSepolia,
17-
base,
18-
polygon,
19-
ethereumClassic,
16+
// scrollSepolia,
17+
// base,
18+
// polygon,
19+
// ethereumClassic,
2020
citreaTestnet,
2121
] as const,
2222
ssr: true, // Disable SSR for static export

web/src/utils/explorer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ export const getExplorerUrl = (hash: `0x${string}`, chainId: number): string =>
33
1: "https://etherscan.io/tx/",
44
137: "https://polygonscan.com/tx/",
55
534351: "https://sepolia.scrollscan.com/tx/",
6-
5115: "https://explorer.testnet.mantle.xyz/tx/",
7-
61: "https://explorer.testnet.rsk.co/tx/",
6+
5115: "https://explorer.testnet.citrea.xyz/tx/",
7+
61: "https://etc.blockscout.com/tx/",
88
2001: "https://explorer.testnet.milkomeda.com/tx/",
99
8453: "https://basescan.org/tx/",
10-
84531: "https://goerli.basescan.org/tx/",
10+
// 84531: "https://goerli.basescan.org/tx/",
1111
};
1212

1313
const baseUrl = baseUrls[chainId];

0 commit comments

Comments
 (0)