update: contractShardId can be 0, change to null-check

pull/193/head
victa 3 years ago
parent f771b979af
commit 40ca58b2ed
  1. 2
      src/pages/AddressPage/index.tsx

@ -147,7 +147,7 @@ export function AddressPage() {
// contract defined and contract address same as id // contract defined and contract address same as id
// note: when we toggle there is scenarios where the id are not the same // note: when we toggle there is scenarios where the id are not the same
// @ts-ignore // @ts-ignore
if (!!contracts && contracts?.address === id && !!contractShardId) { if (!!contracts && contracts?.address === id && contractShardId !== null) {
loadSourceCode(id, contractShardId) loadSourceCode(id, contractShardId)
.then((res) => setSourceCode(res)) .then((res) => setSourceCode(res))
.catch((except) => { .catch((except) => {

Loading…
Cancel
Save