Skip to content

Commit 74bef2e

Browse files
committed
ts-web/rt: correct CallResult.unknown type
1 parent 94686d3 commit 74bef2e

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

client-sdk/ts-web/rt/src/callformat.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,11 @@ export async function decodeResult(
113113
if (result.unknown) {
114114
if (meta) {
115115
const metaEncryptedX25519DeoxysII = meta as MetaEncryptedX25519DeoxysII;
116-
const envelop = oasis.misc.fromCBOR(
117-
result.unknown,
118-
) as types.ResultEnvelopeX25519DeoxysII;
116+
const envelope = result.unknown as types.ResultEnvelopeX25519DeoxysII;
119117
const zeroBuffer = new Uint8Array(0);
120118
const pt = await mraeDeoxysii.boxOpen(
121-
envelop?.nonce,
122-
envelop?.data,
119+
envelope?.nonce,
120+
envelope?.data,
123121
zeroBuffer,
124122
metaEncryptedX25519DeoxysII.pk,
125123
metaEncryptedX25519DeoxysII.sk,

client-sdk/ts-web/rt/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export interface Call {
252252
export interface CallResult {
253253
ok?: unknown;
254254
fail?: FailedCallResult;
255-
unknown?: Uint8Array;
255+
unknown?: unknown;
256256
}
257257

258258
export interface FailedCallResult {

0 commit comments

Comments
 (0)