From f5d69d35cf5bb4aa76a8ad0c51423ee5e35f14e0 Mon Sep 17 00:00:00 2001 From: Clockwork Date: Tue, 5 Dec 2023 08:49:22 +0200 Subject: [PATCH] feat: Adjust tx queries for SDK > 0.47.,0 --- packages/react-template/src/def-hooks/useTransactions.ts | 4 ++-- packages/vue-template/src/def-composables/useTransactions.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-template/src/def-hooks/useTransactions.ts b/packages/react-template/src/def-hooks/useTransactions.ts index d09f86e8..d5963293 100644 --- a/packages/react-template/src/def-hooks/useTransactions.ts +++ b/packages/react-template/src/def-hooks/useTransactions.ts @@ -8,8 +8,8 @@ export const useTransactions = () => { const { ServiceGetTxsEvent } = useCosmosTxV1Beta1(); const SENT_EVENT = `transfer.sender='${address}'`; const RECEIVED_EVENT = `transfer.recipient='${address}'`; - const sentQuery = ServiceGetTxsEvent({ events: SENT_EVENT }, {}, 100); - const receivedQuery = ServiceGetTxsEvent({ events: RECEIVED_EVENT }, {}, 100); + const sentQuery = ServiceGetTxsEvent({ query: SENT_EVENT }, {}, 100); + const receivedQuery = ServiceGetTxsEvent({ query: RECEIVED_EVENT }, {}, 100); type HelperTxs = NonNullable>["pages"][0]["tx_responses"]>; const allSent = sentQuery.data?.pages.reduce((txs, page) => { diff --git a/packages/vue-template/src/def-composables/useTransactions.ts b/packages/vue-template/src/def-composables/useTransactions.ts index 46e97b7c..e0af2393 100644 --- a/packages/vue-template/src/def-composables/useTransactions.ts +++ b/packages/vue-template/src/def-composables/useTransactions.ts @@ -11,9 +11,9 @@ export const useTransactions = () => { const RECEIVED_EVENT = computed( () => `transfer.recipient='${address.value}'` ); - const sentQuery = ServiceGetTxsEvent({ events: SENT_EVENT.value }, {}, 100); + const sentQuery = ServiceGetTxsEvent({ query: SENT_EVENT.value }, {}, 100); const receivedQuery = ServiceGetTxsEvent( - { events: RECEIVED_EVENT.value }, + { query: RECEIVED_EVENT.value }, {}, 100 );