Skip to content

Commit

Permalink
Hotfix: avoid page crash on loading :chainId/contractAddress (#3772)
Browse files Browse the repository at this point in the history
<!-- start pr-codex -->

## PR-Codex overview
This PR updates a conditional check in the file `apps/dashboard/src/pages/[chain_id]/[...paths].tsx`.

### Detailed summary
- Updated conditional check for `configuredChain` to compare `getDashboardChainRpc` values for different chain IDs.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
  • Loading branch information
kien-ngo committed Jul 22, 2024
1 parent f082af0 commit 4d392ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/dashboard/src/pages/[chain_id]/[...paths].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ const ContractPage: ThirdwebNextPage = () => {

const configuredChain = supportedChainsSlugRecord[chainSlug];
if (
configuredChain &&
getDashboardChainRpc(configuredChain.chainId) !==
getDashboardChainRpc(chain.chainId)
getDashboardChainRpc(chain.chainId)
) {
setContractInfo({
chainSlug,
Expand Down

0 comments on commit 4d392ef

Please sign in to comment.