From 42af26982431a42319c9e7f41e7467170558e091 Mon Sep 17 00:00:00 2001 From: donnyquixotic Date: Tue, 20 Feb 2024 16:14:41 -0600 Subject: [PATCH 01/20] feat: txs route, add block filter to api query --- src/components/InternalTransactionTable.vue | 1 + src/components/TransactionTable.vue | 4 ++++ src/router/routes.js | 22 ++++++++++----------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/InternalTransactionTable.vue b/src/components/InternalTransactionTable.vue index bbb1379e3..990449961 100644 --- a/src/components/InternalTransactionTable.vue +++ b/src/components/InternalTransactionTable.vue @@ -224,6 +224,7 @@ export default { const { page, rowsPerPage, descending } = props.pagination; let path; const filter = Object.assign({}, this.filter ? this.filter : {}); + debugger; if (filter.address) { path = `/address/${filter.address}/transactions`; } else { diff --git a/src/components/TransactionTable.vue b/src/components/TransactionTable.vue index a30e3276b..1ae819041 100644 --- a/src/components/TransactionTable.vue +++ b/src/components/TransactionTable.vue @@ -253,6 +253,7 @@ export default { getPath(props) { const { page, rowsPerPage, descending } = props.pagination; const filter = (this.filter.toString().length > 0) ? this.filter.toString() : ''; + const blockNumber = this.$route.query.block; let path = `${filter}/transactions?limit=${ rowsPerPage === 0 ? 500 : rowsPerPage }`; @@ -260,6 +261,9 @@ export default { path += `&sort=${descending ? 'desc' : 'asc'}`; path += (this.pagination.rowsNumber === 0) ? '&includePagination=true' : ''; // We only need the count once path += '&includeAbi=true'; + if (blockNumber){ + path += `&block=${blockNumber}`; + } return path; }, toggleDateFormat() { diff --git a/src/router/routes.js b/src/router/routes.js index ee3234a79..9dd3bdcfc 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -42,6 +42,17 @@ const routes = [ component: () => import('pages/Transaction.vue'), }], }, + { + path: '/txs', + component: () => import('layouts/MainLayout.vue'), + children: [ + { + path: '', + name: 'transactions', + component: () => import('pages/Transactions.vue'), + }, + ], + }, { path: '/block/:block', component: () => import('layouts/MainLayout.vue'), @@ -62,17 +73,6 @@ const routes = [ }, ], }, - { - path: '/transactions', - component: () => import('layouts/MainLayout.vue'), - children: [ - { - path: '', - name: 'transactions', - component: () => import('pages/Transactions.vue'), - }, - ], - }, { path: '/staking', component: () => import('layouts/MainLayout.vue'), From 8de643460f856d075967b2c4068c3cdcca24b00a Mon Sep 17 00:00:00 2001 From: donnyquixotic Date: Tue, 20 Feb 2024 18:27:07 -0600 Subject: [PATCH 02/20] refactor(wip): migrate TransactionTable component to setup --- src/components/TransactionTable.vue | 507 ++++++++++++++-------------- 1 file changed, 252 insertions(+), 255 deletions(-) diff --git a/src/components/TransactionTable.vue b/src/components/TransactionTable.vue index 1ae819041..566c807d3 100644 --- a/src/components/TransactionTable.vue +++ b/src/components/TransactionTable.vue @@ -1,276 +1,273 @@ -