Skip to content

Commit

Permalink
feat: Adjust tx queries for SDK > 0.47.,0
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworkgr committed Dec 5, 2023
1 parent fcf99ef commit f5d69d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react-template/src/def-hooks/useTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<NonNullable<Required<typeof sentQuery.data>>["pages"][0]["tx_responses"]>;
const allSent =
sentQuery.data?.pages.reduce((txs, page) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/vue-template/src/def-composables/useTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export const useTransactions = () => {
const RECEIVED_EVENT = computed<string>(
() => `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
);
Expand Down

0 comments on commit f5d69d3

Please sign in to comment.