mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Updates for wasmd v0.7.0-rc2
This commit is contained in:
parent
9195ae52cf
commit
653bccf1c7
@ -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.
|
||||
|
2
packages/sdk/types/restclient.d.ts
vendored
2
packages/sdk/types/restclient.d.ts
vendored
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user