From 75ddd6ddb0f994be92246ae4b6ddcd981ba44f4c Mon Sep 17 00:00:00 2001 From: Floyd Li Date: Fri, 10 May 2024 16:45:30 +0800 Subject: [PATCH 1/2] typo: fix some text spell errors --- app/page.tsx | 2 +- repository/avail-light.repository.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 54a8adb..976446e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -59,7 +59,7 @@ export default function Home() { ) => { addNewBlock(block, matrix); setProcessingBlock(true); - //Indivisual cell verification + //Individual cell verification let verifiedCount = 0; let verifiedCells: Cell[] = []; diff --git a/repository/avail-light.repository.ts b/repository/avail-light.repository.ts index bf1be60..0265789 100644 --- a/repository/avail-light.repository.ts +++ b/repository/avail-light.repository.ts @@ -33,7 +33,7 @@ export async function runLC(onBlock: Function, registerUnsubscribe: Function): P const kate_Proof = Uint8Array.from(kateProof) const kate_commitment = Uint8Array.from(kateCommitment.match(/.{1,2}/g).map((byte: string) => parseInt(byte, 16))) - //Creating commitement array based on rows and proof array based on cells + //Creating commitment array based on rows and proof array based on cells let commitments: Uint8Array[] = [] for (let i = 0; i < (r * config.EXTENSION_FACTOR); i++) { commitments.push(kate_commitment.slice(i * config.COMMITMENT_SIZE, (i + 1) * config.COMMITMENT_SIZE)) From 6136fe6e4ba5941e2f5137b81b28c4256bb2f5a7 Mon Sep 17 00:00:00 2001 From: Floyd Li Date: Fri, 10 May 2024 16:46:40 +0800 Subject: [PATCH 2/2] typo: camel case func name --- app/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 976446e..ffed1bc 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -14,7 +14,7 @@ import { runLC } from "@/repository/avail-light.repository"; import Link from "next/link"; export default function Home() { - const [blocksToProcess, setblocksToProcess] = useState>([]) + const [blocksToProcess, setBlocksToProcess] = useState>([]) const [latestBlock, setLatestBlock] = useState(null); const [blockList, setBlockList] = useState>([]); const [matrix, setMatrix] = useState({ @@ -44,7 +44,7 @@ export default function Home() { if (!processingBlock && blocksToProcess.length > 0) { const blockToProcess: BlockToProcess = blocksToProcess[0] processBlock(blockToProcess.block, blockToProcess.matrix, blockToProcess.randomCells, blockToProcess.proofs, blockToProcess.commitments) - setblocksToProcess((list: BlockToProcess[]) => list.slice(1, list.length)) + setBlocksToProcess((list: BlockToProcess[]) => list.slice(1, list.length)) } }, [blocksToProcess, processingBlock]) @@ -109,7 +109,7 @@ export default function Home() { const run = async () => { refreshApp(); - runLC(setblocksToProcess, setStop); + runLC(setBlocksToProcess, setStop); }; const scrollToBlocks = () => {