From 653bccf1c725a8a29c57a693202cfd06b903755e Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Sat, 29 Feb 2020 20:59:57 +0100 Subject: [PATCH] Updates for wasmd v0.7.0-rc2 --- packages/sdk/src/restclient.ts | 19 +++---------------- packages/sdk/types/restclient.d.ts | 2 +- scripts/wasmd/env | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/packages/sdk/src/restclient.ts b/packages/sdk/src/restclient.ts index da4ad80c..4e064fdc 100644 --- a/packages/sdk/src/restclient.ts +++ b/packages/sdk/src/restclient.ts @@ -168,7 +168,7 @@ type RestClientResponse = | WasmResponse | WasmResponse | WasmResponse - | WasmResponse + | WasmResponse | WasmResponse; /** @@ -363,21 +363,8 @@ export class RestClient { */ public async getContractInfo(address: string): Promise { const path = `/wasm/contract/${address}`; - - try { - const response = (await this.get(path)) as WasmResponse; - return unwrapWasmResponse(response); - } catch (error) { - if (error instanceof Error) { - if (error.message.startsWith("unknown address:")) { - return null; - } else { - throw error; - } - } else { - throw error; - } - } + const response = (await this.get(path)) as WasmResponse; + return unwrapWasmResponse(response); } // Returns all contract state. diff --git a/packages/sdk/types/restclient.d.ts b/packages/sdk/types/restclient.d.ts index 7c3ab410..eaa59c0f 100644 --- a/packages/sdk/types/restclient.d.ts +++ b/packages/sdk/types/restclient.d.ts @@ -126,7 +126,7 @@ declare type RestClientResponse = | WasmResponse | WasmResponse | WasmResponse - | WasmResponse + | WasmResponse | WasmResponse; /** * The mode used to send transaction diff --git a/scripts/wasmd/env b/scripts/wasmd/env index e86a31c0..44e57464 100644 --- a/scripts/wasmd/env +++ b/scripts/wasmd/env @@ -1,5 +1,5 @@ # Choose from https://hub.docker.com/r/cosmwasm/wasmd-demo/tags REPOSITORY="cosmwasm/wasmd-demo" -VERSION="v0.7.0-rc1" +VERSION="v0.7.0-rc2" CONTAINER_NAME="wasmd"