Add filter message.module=bank just in case
This commit is contained in:
parent
dd8d630532
commit
df6db45e36
@ -159,8 +159,10 @@ export class CosmWasmClient {
|
||||
}
|
||||
} else if (isSearchBySentFromOrToQuery(query)) {
|
||||
// We cannot get both in one request (see https://github.com/cosmos/gaia/issues/75)
|
||||
const sent = await this.txsQuery(withFilters(`message.sender=${query.sentFromOrTo}`));
|
||||
const received = await this.txsQuery(withFilters(`transfer.recipient=${query.sentFromOrTo}`));
|
||||
const sentQuery = withFilters(`message.module=bank&message.sender=${query.sentFromOrTo}`);
|
||||
const receivedQuery = withFilters(`transfer.recipient=${query.sentFromOrTo}`);
|
||||
const sent = await this.txsQuery(sentQuery);
|
||||
const received = await this.txsQuery(receivedQuery);
|
||||
|
||||
const sentHashes = sent.map(t => t.txhash);
|
||||
txs = [...sent, ...received.filter(t => !sentHashes.includes(t.txhash))];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user