Adapt calls to queryContractSmart

This commit is contained in:
Simon Warta
2020-05-20 16:32:38 +02:00
parent 82b23c87b5
commit 36b8fe74af
2 changed files with 3 additions and 7 deletions
+2 -3
View File
@@ -60,9 +60,8 @@ const connect = async (mnemonic: string, opts: Partial<Options>): Promise<{
};
// smartQuery assumes the content is proper JSON data and parses before returning it
const smartQuery = async (client: CosmWasmClient, addr: string, query: object): Promise<any> => {
const bin = await client.queryContractSmart(addr, query);
return JSON.parse(fromUtf8(bin));
async function smartQuery(client: CosmWasmClient, addr: string, query: object): Promise<any> {
return client.queryContractSmart(addr, query);
}
// loadOrCreateMnemonic will try to load a mnemonic from the file.