Skip to content

Commit c8b5780

Browse files
committed
[Dashboard] Fix contract source code page (#5218)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR updates the error handling for resolving the contract ABI in the `page.tsx` file by changing the promise handling from `then` to `catch`, ensuring that any errors in resolving the ABI will result in `undefined` being assigned. ### Detailed summary - Changed the promise handling for `resolveContractAbi(contract)`: - From using `.then(() => undefined)` to `.catch(() => undefined)` to properly handle errors. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 68ce724 commit c8b5780

File tree

1 file changed

+1
-1
lines changed
  • apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/code

1 file changed

+1
-1
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/code/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default async function Page(props: {
2828
);
2929
}
3030

31-
const abi = await resolveContractAbi(contract).then(() => undefined);
31+
const abi = await resolveContractAbi(contract).catch(() => undefined);
3232

3333
return (
3434
<ContractCodePage

0 commit comments

Comments
 (0)