Add module filter in receivedQuery

This commit is contained in:
Simon Warta 2020-03-02 17:01:11 +01:00
parent 7576033134
commit b6045e00bb

View File

@ -176,7 +176,7 @@ export class CosmWasmClient {
} else if (isSearchBySentFromOrToQuery(query)) {
// We cannot get both in one request (see https://github.com/cosmos/gaia/issues/75)
const sentQuery = withFilters(`message.module=bank&message.sender=${query.sentFromOrTo}`);
const receivedQuery = withFilters(`transfer.recipient=${query.sentFromOrTo}`);
const receivedQuery = withFilters(`message.module=bank&transfer.recipient=${query.sentFromOrTo}`);
const sent = await this.txsQuery(sentQuery);
const received = await this.txsQuery(receivedQuery);