Merge pull request #128 from confio/rc2-update

Updates for wasmd v0.7.0-rc2
This commit is contained in:
Simon Warta 2020-02-29 22:16:29 +01:00 committed by GitHub
commit 661ff9dcc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 18 deletions

View File

@ -168,7 +168,7 @@ type RestClientResponse =
| WasmResponse<string>
| WasmResponse<CodeInfo[]>
| WasmResponse<ContractInfo[] | null>
| WasmResponse<ContractDetails>
| WasmResponse<ContractDetails | null>
| WasmResponse<GetCodeResult>;
/**
@ -363,21 +363,8 @@ export class RestClient {
*/
public async getContractInfo(address: string): Promise<ContractDetails | null> {
const path = `/wasm/contract/${address}`;
try {
const response = (await this.get(path)) as WasmResponse<ContractDetails>;
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<ContractDetails | null>;
return unwrapWasmResponse(response);
}
// Returns all contract state.

View File

@ -126,7 +126,7 @@ declare type RestClientResponse =
| WasmResponse<string>
| WasmResponse<CodeInfo[]>
| WasmResponse<ContractInfo[] | null>
| WasmResponse<ContractDetails>
| WasmResponse<ContractDetails | null>
| WasmResponse<GetCodeResult>;
/**
* The mode used to send transaction

View File

@ -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"