Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
damianmarti committed Apr 2, 2024
1 parent 14855f7 commit 0517c4f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/nextjs/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,18 @@ const Home: NextPage = () => {
if ("withdrawalsRoot" in blockData && blockData.withdrawalsRoot !== undefined) {
values.push(blockData.withdrawalsRoot);
}
if ("blobGasUsed" in blockData && blockData.blobGasUsed !== undefined) {
values.push(blockData.blobGasUsed);
if ("blobGasUsed" in blockData && blockData.blobGasUsed !== undefined && blockData.blobGasUsed !== null) {
values.push(blockData.blobGasUsed as `0x${string}`);
}
if ("excessBlobGas" in blockData && blockData.excessBlobGas !== undefined) {
values.push(blockData.excessBlobGas);
if ("excessBlobGas" in blockData && blockData.excessBlobGas !== undefined && blockData.excessBlobGas !== null) {
values.push(blockData.excessBlobGas as `0x${string}`);
}
if ("parentBeaconBlockRoot" in blockData && blockData.parentBeaconBlockRoot !== undefined) {
values.push(blockData.parentBeaconBlockRoot);
if (
"parentBeaconBlockRoot" in blockData &&
blockData.parentBeaconBlockRoot !== undefined &&
blockData.parentBeaconBlockRoot !== null
) {
values.push(blockData.parentBeaconBlockRoot as `0x${string}`);
}

console.log("blockData values: ", values);
Expand Down

0 comments on commit 0517c4f

Please sign in to comment.