Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libs/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ export class CosmosRestClient extends BaseRestClient<RequestRegistry> {
// tx
async getTxsBySender(sender: string, page?: PageRequest) {
if(!page) page = new PageRequest()
const query = `?order_by=2&events=message.sender='${sender}'&pagination.limit=${page.limit}&pagination.offset=${page.offset||0}`;
const query = `?order_by=2&query=message.sender='${sender}'&pagination.limit=${page.limit}&pagination.offset=${page.offset||0}`;
return this.request(this.registry.tx_txs, {}, query);
}
// query ibc sending msgs
// ?&pagination.reverse=true&events=send_packet.packet_src_channel='${channel}'&events=send_packet.packet_src_port='${port}'
// ?&pagination.reverse=true&query=send_packet.packet_src_channel='${channel}'&query=send_packet.packet_src_port='${port}'
// query ibc receiving msgs
// ?&pagination.reverse=true&events=recv_packet.packet_dst_channel='${channel}'&events=recv_packet.packet_dst_port='${port}'
// ?&pagination.reverse=true&query=recv_packet.packet_dst_channel='${channel}'&query=recv_packet.packet_dst_port='${port}'
async getTxs(query: string, params: any, page?: PageRequest) {
if(!page) page = new PageRequest()
return this.request(this.registry.tx_txs, params, `${query}&${page.toQueryString()}`);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/account/[address].vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function loadAccount(address: string) {
});
});

const receivedQuery = `?&pagination.reverse=true&events=coin_received.receiver='${address}'&pagination.limit=5`;
const receivedQuery = `?&pagination.reverse=true&query=coin_received.receiver='${address}'&pagination.limit=5`;
blockchain.rpc.getTxs(receivedQuery, {}).then((x) => {
recentReceived.value = x.tx_responses;
});
Expand Down
2 changes: 1 addition & 1 deletion src/modules/[chain]/staking/[validator].vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function loadPowerEvents(p: number, type: EventType) {
selectedEventType.value = type
page.setPage(p);
page.setPageSize(5);
blockchain.rpc.getTxs("?order_by=2&events={type}.validator='{validator}'", { type: selectedEventType.value, validator }, page).then(res => {
blockchain.rpc.getTxs("?order_by=2&query={type}.validator='{validator}'", { type: selectedEventType.value, validator }, page).then(res => {
events.value = res
})
}
Expand Down