Skip to content

Commit 106c002

Browse files
authored
Merge pull request #18 from unionlabs/fix-tx-query
chore: fix tx query
2 parents 8591ee7 + 90c0506 commit 106c002

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/libs/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,13 @@ export class CosmosRestClient extends BaseRestClient<RequestRegistry> {
274274
// tx
275275
async getTxsBySender(sender: string, page?: PageRequest) {
276276
if(!page) page = new PageRequest()
277-
const query = `?order_by=2&events=message.sender='${sender}'&pagination.limit=${page.limit}&pagination.offset=${page.offset||0}`;
277+
const query = `?order_by=2&query=message.sender='${sender}'&pagination.limit=${page.limit}&pagination.offset=${page.offset||0}`;
278278
return this.request(this.registry.tx_txs, {}, query);
279279
}
280280
// query ibc sending msgs
281-
// ?&pagination.reverse=true&events=send_packet.packet_src_channel='${channel}'&events=send_packet.packet_src_port='${port}'
281+
// ?&pagination.reverse=true&query=send_packet.packet_src_channel='${channel}'&query=send_packet.packet_src_port='${port}'
282282
// query ibc receiving msgs
283-
// ?&pagination.reverse=true&events=recv_packet.packet_dst_channel='${channel}'&events=recv_packet.packet_dst_port='${port}'
283+
// ?&pagination.reverse=true&query=recv_packet.packet_dst_channel='${channel}'&query=recv_packet.packet_dst_port='${port}'
284284
async getTxs(query: string, params: any, page?: PageRequest) {
285285
if(!page) page = new PageRequest()
286286
return this.request(this.registry.tx_txs, params, `${query}&${page.toQueryString()}`);

src/modules/[chain]/account/[address].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function loadAccount(address: string) {
113113
});
114114
});
115115
116-
const receivedQuery = `?&pagination.reverse=true&events=coin_received.receiver='${address}'&pagination.limit=5`;
116+
const receivedQuery = `?&pagination.reverse=true&query=coin_received.receiver='${address}'&pagination.limit=5`;
117117
blockchain.rpc.getTxs(receivedQuery, {}).then((x) => {
118118
recentReceived.value = x.tx_responses;
119119
});

src/modules/[chain]/staking/[validator].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ function loadPowerEvents(p: number, type: EventType) {
212212
selectedEventType.value = type
213213
page.setPage(p);
214214
page.setPageSize(5);
215-
blockchain.rpc.getTxs("?order_by=2&events={type}.validator='{validator}'", { type: selectedEventType.value, validator }, page).then(res => {
215+
blockchain.rpc.getTxs("?order_by=2&query={type}.validator='{validator}'", { type: selectedEventType.value, validator }, page).then(res => {
216216
events.value = res
217217
})
218218
}

0 commit comments

Comments
 (0)