From 82eeaff60102c068aadfad3ca68308fd8c3cf426 Mon Sep 17 00:00:00 2001
From: liangping <18786721@qq.com>
Date: Fri, 18 Mar 2022 14:58:56 +0800
Subject: [PATCH] add missing blocks and filter by parameters
---
src/libs/fetch.js | 8 ++---
src/views/Uptime.vue | 35 +++++++++++++++----
src/views/UptimeMyChainBlocks.vue | 37 +++++++++++++++-----
src/views/UptimeMyValidators.vue | 56 ++++++++++++++++++++++++-------
4 files changed, 105 insertions(+), 31 deletions(-)
diff --git a/src/libs/fetch.js b/src/libs/fetch.js
index 450c370d..3d473ae3 100644
--- a/src/libs/fetch.js
+++ b/src/libs/fetch.js
@@ -71,8 +71,8 @@ export default class ChainFetch {
return this.get(`/blocks/${height}`, config).then(data => Block.create(data))
}
- async getSlashingSigningInfo() {
- return this.get('/cosmos/slashing/v1beta1/signing_infos')
+ async getSlashingSigningInfo(config = null) {
+ return this.get('/cosmos/slashing/v1beta1/signing_infos?pagination.limit=500', config)
}
async getTxs(hash) {
@@ -140,8 +140,8 @@ export default class ChainFetch {
})
}
- async getValidatorList() {
- return this.get('/staking/validators').then(data => {
+ async getValidatorList(config = null) {
+ return this.get('/staking/validators', config).then(data => {
const vals = commonProcess(data).map(i => new Validator().init(i))
localStorage.setItem(`validators-${this.config.chain_name}`, JSON.stringify(vals))
return vals
diff --git a/src/views/Uptime.vue b/src/views/Uptime.vue
index 288e7f37..fc8b1d48 100644
--- a/src/views/Uptime.vue
+++ b/src/views/Uptime.vue
@@ -32,13 +32,23 @@
md="4"
class="text-truncate"
>
-
https://ping.pub/cosmos/uptime/my?validators={"sifchain":["FBADE9A30473BB9ED6DFA16BFB3838E028F33650"],"chain_name":["hexAddress"]}