]> git.ardis.lu - block-hash-calculator/commitdiff
Improve presentation of nested arrays
authorArdis Lu <ardisglu@gmail.com>
Tue, 21 Apr 2026 07:28:09 +0000 (00:28 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 21 Apr 2026 07:28:09 +0000 (00:28 -0700)
index.html

index 7b42bacfd3d52f2ff085caf42b840a5377e25f4f..6096508954f3c12074b39877b96c84dd7997b582 100644 (file)
@@ -89,7 +89,7 @@
       }
       else {
         const { header, encoded, hash } = block?.l1BatchTimestamp && block?.l1BatchNumber ? calculateZkSync(block) : calculate(block);
-        document.querySelector('#out-header').textContent = `[\n  ${header.join(',\n  ')}\n]`;
+        document.querySelector('#out-header').textContent = JSON.stringify(header, (_, v) => typeof v === 'bigint' ? v.toString() : v, 2).replaceAll('"', '');
         document.querySelector('#out-encoded').textContent = encoded;
         document.querySelector('#out-hash').textContent = hash;
       }
This page took 0.034551 seconds and 4 git commands to generate.