diff --git a/packages/bcp/src/decode.ts b/packages/bcp/src/decode.ts index aa4edb9c..4d4cea12 100644 --- a/packages/bcp/src/decode.ts +++ b/packages/bcp/src/decode.ts @@ -101,10 +101,10 @@ export function parseMsg( }; } - const recipient: string | undefined = (msg.value.msg as any).transfer?.recipient; + const recipient: string | undefined = msg.value.msg.transfer?.recipient; if (!recipient) throw new Error("Could not read recipient"); - const amount: string | undefined = (msg.value.msg as any).transfer?.amount; + const amount: string | undefined = msg.value.msg.transfer?.amount; if (!amount) throw new Error("Could not read recipient"); const send: SendTransaction = { diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 1a354ade..4b519f69 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -24,7 +24,7 @@ export interface CosmosSdkTx { interface MsgTemplate { readonly type: string; - readonly value: object; + readonly value: any; } /** A Cosmos SDK token transfer message */ @@ -73,7 +73,7 @@ export interface MsgInstantiateContract extends MsgTemplate { /** Human-readable label for this contract */ readonly label: string; /** Init message as JavaScript object */ - readonly init_msg: object; + readonly init_msg: any; readonly init_funds: ReadonlyArray; }; } @@ -91,7 +91,7 @@ export interface MsgExecuteContract extends MsgTemplate { /** Bech32 account address */ readonly contract: string; /** Handle message as JavaScript object */ - readonly msg: object; + readonly msg: any; readonly sent_funds: ReadonlyArray; }; } diff --git a/packages/sdk/types/types.d.ts b/packages/sdk/types/types.d.ts index 1a62733a..b5a1da7a 100644 --- a/packages/sdk/types/types.d.ts +++ b/packages/sdk/types/types.d.ts @@ -12,7 +12,7 @@ export interface CosmosSdkTx { } interface MsgTemplate { readonly type: string; - readonly value: object; + readonly value: any; } /** A Cosmos SDK token transfer message */ export interface MsgSend extends MsgTemplate { @@ -58,7 +58,7 @@ export interface MsgInstantiateContract extends MsgTemplate { /** Human-readable label for this contract */ readonly label: string; /** Init message as JavaScript object */ - readonly init_msg: object; + readonly init_msg: any; readonly init_funds: ReadonlyArray; }; } @@ -75,7 +75,7 @@ export interface MsgExecuteContract extends MsgTemplate { /** Bech32 account address */ readonly contract: string; /** Handle message as JavaScript object */ - readonly msg: object; + readonly msg: any; readonly sent_funds: ReadonlyArray; }; }