From ba1a213fad1f63a4fcb8e71f1d2550b715af54e0 Mon Sep 17 00:00:00 2001 From: tom goriunov Date: Wed, 13 Nov 2024 18:54:50 +0100 Subject: [PATCH] Zilliqa: "Verified contracts" page crashes on desktop (#2393) Fixes #2389 --- types/api/contracts.ts | 2 +- ui/verifiedContracts/VerifiedContractsTableItem.tsx | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/types/api/contracts.ts b/types/api/contracts.ts index a8d15290a7..d24edd49bd 100644 --- a/types/api/contracts.ts +++ b/types/api/contracts.ts @@ -5,7 +5,7 @@ export interface VerifiedContract { address: AddressParam; certified?: boolean; coin_balance: string; - compiler_version: string; + compiler_version: string | null; language: 'vyper' | 'yul' | 'solidity'; has_constructor_args: boolean; optimization_enabled: boolean; diff --git a/ui/verifiedContracts/VerifiedContractsTableItem.tsx b/ui/verifiedContracts/VerifiedContractsTableItem.tsx index 35d46dd84d..fc218b9335 100644 --- a/ui/verifiedContracts/VerifiedContractsTableItem.tsx +++ b/ui/verifiedContracts/VerifiedContractsTableItem.tsx @@ -66,11 +66,13 @@ const VerifiedContractsTableItem = ({ data, isLoading }: Props) => { { data.language } - - - { data.compiler_version.split('+')[0] } - - + { data.compiler_version && ( + + + { data.compiler_version.split('+')[0] } + + + ) } { data.zk_compiler_version && (