From 7527c95dcca05321883bfe043249adb2d9ef7d05 Mon Sep 17 00:00:00 2001 From: Shawn Reuland Date: Fri, 8 Sep 2023 13:00:03 -0700 Subject: [PATCH] updated test typescript to use latest js soroban client interfaces for meta resutls --- invoke.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/invoke.ts b/invoke.ts index 0c95a3b..318e564 100755 --- a/invoke.ts +++ b/invoke.ts @@ -62,13 +62,11 @@ async function main() { break; } case "SUCCESS": { - if (!response.resultMetaXdr) { - throw new Error(`No result meta XDR: ${JSON.stringify(response)}`); + if (!response.returnValue) { + throw new Error(`No invoke host fn return value provided: ${JSON.stringify(response)}`); } - const result = SorobanClient.xdr.TransactionMeta.fromXDR(response.resultMetaXdr, "base64"); - // TODO: Move this scval serializing stuff to stellar-base - const scval = result.v3().sorobanMeta()?.returnValue()!; + const scval:SorobanClient.xdr.ScVal = response.returnValue; const parsed = SorobanClient.scValToNative(scval); console.log(JSON.stringify(parsed)); return;