From 65654e963da32dc1dcf1ba6c0300882a88b69ec8 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 24 Nov 2020 20:20:50 +0300 Subject: [PATCH] Fix: mempool view --- src/components/RawJsonViewer.vue | 32 +++++++--- src/views/contract/OperationsTab.vue | 87 +++++++++++++++++----------- 2 files changed, 78 insertions(+), 41 deletions(-) diff --git a/src/components/RawJsonViewer.vue b/src/components/RawJsonViewer.vue index 14786ee5..52d290a8 100644 --- a/src/components/RawJsonViewer.vue +++ b/src/components/RawJsonViewer.vue @@ -16,7 +16,13 @@ @@ -29,7 +35,9 @@ v-clipboard="() => getSection(item)" v-clipboard:success="showClipboardOK" > - {{ item }} + {{ + item + }} @@ -52,12 +60,15 @@ > mdi-open-in-newIn new tab - - mdi-closeClose - + mdi-closeClose - - + + 0 ? this.level : "head"; if (this.type === "operation") { - res = this.rpc.getOperation(this.network, level, this.hash); + if (this.mempool) { + console.log("mempool") + } else { + res = this.rpc.getOperation(this.network, level, this.hash); + } } else if (this.type === "big_map") { res = this.rpc.getBigMapValue( this.network, diff --git a/src/views/contract/OperationsTab.vue b/src/views/contract/OperationsTab.vue index cfd1e00d..f2541948 100644 --- a/src/views/contract/OperationsTab.vue +++ b/src/views/contract/OperationsTab.vue @@ -4,7 +4,16 @@ @@ -40,12 +48,11 @@ > @@ -74,8 +81,12 @@ - Cancel - OK + Cancel + OK @@ -89,25 +100,34 @@ - - - + - - + + + + + @@ -149,10 +169,11 @@ export default { }, computed: { loading() { - return this.operationsLoading || this.mempoolLoading; + return (this.operationsLoading || this.mempoolLoading) && this.items.length === 0; }, items() { let operations = []; + if (this.operations.length === 0) return []; if (this.last_id !== null) operations = this.operations; if (this.config.MEMPOOL_ENABLED) { @@ -186,7 +207,7 @@ export default { }, isContract() { return this.address.startsWith("KT"); - } + }, }, methods: { ...mapActions(["showError"]),