From 72f482469399ab698b36fcea84a2681fd613f459 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 8 Apr 2023 19:26:13 +0530 Subject: [PATCH] Co-authored-by: sairaj mote --- index.html | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 394050d..78d910c 100644 --- a/index.html +++ b/index.html @@ -408,7 +408,7 @@ router.addRoute('block', async state => { const [blockId] = state.wildcards if (!blockId) return; - let [blockInfo, blockTxs] = await Promise.all([getBlockInfo(blockId), getBlockTxs(blockId)]) + let [blockInfo, blockTxs] = await Promise.all([getBlockInfo(blockId), getBlockTransactions(blockId)]) renderElem(getRef("page_container"), html`${render.blockPage(blockInfo)}`); getRef("page_title").textContent = 'Block' renderTransactions('block_transaction_container', blockTxs) @@ -879,7 +879,17 @@
${title}
${token} -
+
+
+
+
Sender
+ ${sender} +
+
+
Receiver
+ ${receiver} +
+
Amount

${formatAmount(amount, token.toLowerCase() === 'rupee' ? 'inr' : 'usd')} ${token}

@@ -1157,7 +1167,6 @@ } } - async function getBlockTransactions(thisBlock) { const blockTransactions = await fetchJson(`${tokenApiUrl}/api/v2/blockTransactions/${thisBlock}`) return blockTransactions.transactions @@ -1193,6 +1202,9 @@ } function parseTransactions(txList) { + console.log(txList) + if(!Array.isArray(txList)) + txList = Object.values(txList) let latestTxArray = []; txList.forEach(tx => { // console.log(transactionKey)