From 07bd6ee4b19eeb83880c42f7cfcbb8e7f7c401b1 Mon Sep 17 00:00:00 2001
From: liangping <18786721@qq.com>
Date: Thu, 25 Aug 2022 14:57:51 +0800
Subject: [PATCH] add recent transactions
---
src/lang/locales/en.json | 2 +-
src/libs/data/tx.js | 1 +
src/views/Blocks.vue | 135 +++++++++++++++++++++++++++++----------
3 files changed, 102 insertions(+), 36 deletions(-)
diff --git a/src/lang/locales/en.json b/src/lang/locales/en.json
index 05aee2e2..32a0bec7 100644
--- a/src/lang/locales/en.json
+++ b/src/lang/locales/en.json
@@ -36,7 +36,7 @@
"staking": "Staking",
"governance": "Governance",
"summary": "Summary",
- "blocks": "Blocks",
+ "blocks": "Blocks / Txs",
"blockchains": "Blockchains",
"uptime": "Uptime",
"statesync": "State Sync",
diff --git a/src/libs/data/tx.js b/src/libs/data/tx.js
index d5d37d9e..4d8441aa 100644
--- a/src/libs/data/tx.js
+++ b/src/libs/data/tx.js
@@ -9,6 +9,7 @@ export default class Tx {
this.memo = ''
this.messages = []
this.signatures = []
+ this.time = null
}
static create(element) {
diff --git a/src/views/Blocks.vue b/src/views/Blocks.vue
index 82098e91..07232369 100644
--- a/src/views/Blocks.vue
+++ b/src/views/Blocks.vue
@@ -4,57 +4,84 @@
no-body
class="text-truncate"
>
-
-
- Blocks
-
-
-
-
-
-
- {{ data.item.block.header.height }}
-
-
-
- {{ data.item.block_id.hash }}
-
-
- {{ formatTime(data.item.block.header.time) }}
-
-
- {{ formatProposer(data.item.block.header.proposer_address) }}
-
-
- {{ length(data.item.block.data.txs) }}
-
+
+
+
+
+
+
+ {{ data.item.block.header.height }}
+
+
+
+ {{ data.item.block_id.hash }}
+
+
+ {{ formatTime(data.item.block.header.time) }}
+
+
+ {{ formatProposer(data.item.block.header.proposer_address) }}
+
+
+ {{ length(data.item.block.data.txs) }}
+
-
+
+
+
+
+
+
+ {{ shortHash(data.value) }}
+
+
+
+
+