Skip to content

Commit d9ad34b

Browse files
committed
chore(web): rabbit-review
1 parent d267938 commit d9ad34b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

web/src/app/(main)/governor/[governorAddress]/MyLists/Lists.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const AccordionBody: React.FC<IAccordionBody> = ({ list }) => {
119119
<DisplayCard label="Decoded Input" value={selectedTxn?.decodedInput ?? ""} />
120120
</div>
121121

122-
<AddTxnModal {...{ isOpen, toggleIsOpen, listId }} />
122+
{isOpen ? <AddTxnModal {...{ isOpen, toggleIsOpen, listId }} /> : null}
123123
</div>
124124
</div>
125125
);

web/src/app/api/contract/route.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NextRequest, NextResponse } from "next/server";
2+
import { isAddress } from "viem";
23

34
import { isUndefined } from "@/utils";
45
import { checkRateLimit } from "@/utils/simulateRouteUtils";
@@ -27,6 +28,10 @@ export async function GET(request: NextRequest) {
2728
return NextResponse.json({ error: "Missing required parameters: networkId and contractAddress" }, { status: 400 });
2829
}
2930

31+
if (!isAddress(contractAddress)) {
32+
return NextResponse.json({ error: "Invalid contract address format" }, { status: 400 });
33+
}
34+
3035
try {
3136
if (isUndefined(process.env.TENDERLY_ACCESS_KEY)) {
3237
throw new Error("Failed to fetch contract details: Environment variables not configured.");
@@ -78,7 +83,7 @@ async function tryEtherscanFallback(networkId: string, contractAddress: string)
7883
const etherscanApiKey = process.env.ETHERSCAN_API_KEY;
7984

8085
if (isUndefined(etherscanApiKey)) {
81-
return NextResponse.json({ error: "Arbiscan API key not configured" }, { status: 500 });
86+
return NextResponse.json({ error: "Etherscan API key not configured" }, { status: 500 });
8287
}
8388

8489
const baseUrl = "https://api.etherscan.io/v2/api";

0 commit comments

Comments
 (0)