From ede62e4d75d99dbb1b346706791f4914d18c594b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 17 Nov 2020 11:42:37 +0100 Subject: [PATCH] Fix error message for unimplemented functionality Closes #529 --- packages/stargate/src/stargateclient.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/stargate/src/stargateclient.ts b/packages/stargate/src/stargateclient.ts index e8a9da2e..f482d820 100644 --- a/packages/stargate/src/stargateclient.ts +++ b/packages/stargate/src/stargateclient.ts @@ -5,6 +5,8 @@ import { Coin, isSearchByHeightQuery, isSearchByIdQuery, + isSearchBySentFromOrToQuery, + isSearchByTagsQuery, PubKey, SearchTxFilter, SearchTxQuery, @@ -209,6 +211,14 @@ export class StargateClient { query.height >= minHeight && query.height <= maxHeight ? await this.txsQuery(`tx.height=${query.height}`) : []; + } else if (isSearchBySentFromOrToQuery(query)) { + throw new Error( + "This type of search query is not yet implemented. See https://github.com/cosmos/cosmjs/issues/533.", + ); + } else if (isSearchByTagsQuery(query)) { + throw new Error( + "This type of search query is not yet implemented. See https://github.com/cosmos/cosmjs/issues/532.", + ); } else { throw new Error("Unknown query type"); }