Skip to content

Commit

Permalink
Don't try to build parent if cell is ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Oct 23, 2023
1 parent 784108d commit 4cb836d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ function ComputedCell({ cell }: ComputedCellProps) {
const id = useMemo(() => cell.id, [cell]);
const [cellSettings, setCellSettings] = useLocalStorage(
`${selectedSheetAddress}.${id}`,
{}
{},
);
const selected = useMemo(() => id === selectedCell, [selectedCell, id]);
const isInvoke = useMemo(() => {
if (cell.error) {
return false;
}

if (
!!cell.abi &&
((Object.hasOwn(cell.abi, "state_mutability") &&
Expand All @@ -59,7 +63,7 @@ function ComputedCell({ cell }: ComputedCellProps) {
((Object.hasOwn(_cell.abi, "state_mutability") &&
_cell.abi?.state_mutability === "external") ||
(!Object.hasOwn(_cell.abi, "state_mutability") &&
_cell.abi.stateMutability === undefined))
_cell.abi.stateMutability === undefined)),
);
}, [cell, currentCells, id, buildParents]);

Expand Down

0 comments on commit 4cb836d

Please sign in to comment.