From 5821f00a01e885ef3eb2a11dfd5a057899a7a86f Mon Sep 17 00:00:00 2001 From: Shawn Reuland Date: Thu, 2 Nov 2023 13:53:04 -0700 Subject: [PATCH] Fixup env misname, fixup correct api usage --- Makefile | 2 +- invoke.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b608750..dfbdc9c 100644 --- a/Makefile +++ b/Makefile @@ -154,5 +154,5 @@ build: build-quickstart build-soroban-cli --build-arg SOROBAN_CLI_IMAGE_REF=$$SOROBAN_CLI_IMAGE_REF \ --build-arg RUST_TOOLCHAIN_VERSION=$(RUST_TOOLCHAIN_VERSION) \ --build-arg NODE_VERSION=$(NODE_VERSION) \ - --build-arg JS_STELLAR_SDK_VERSION=$(JS_STELLAR_SDK_VERSION) \ + --build-arg JS_STELLAR_SDK_NPM_VERSION=$(JS_STELLAR_SDK_NPM_VERSION) \ --label org.opencontainers.image.revision="$(SYSTEM_TEST_SHA)" .; diff --git a/invoke.ts b/invoke.ts index 6b5e385..43092f9 100755 --- a/invoke.ts +++ b/invoke.ts @@ -40,7 +40,7 @@ async function main() { const sourceAccount = await server.getAccount(account); // Some hacky param-parsing as csv. Generated Typescript bindings would be better. - const params: xdr.ScVal[] = (functionParams ?? []).split(",").map((param) => { + const params: xdr.ScVal[] = (functionParams ?? '').split(",").map((param) => { return xdr.ScVal.scvSymbol(param); }); @@ -52,10 +52,10 @@ async function main() { .setTimeout(30) .build(); - const txn = await server.prepareTransaction(originalTxn,networkPassphrase); + const txn = await server.prepareTransaction(originalTxn); txn.sign(secretKey); const send = await server.sendTransaction(txn); - if (send.errorResultXdr) { + if (send.errorResult) { throw new Error(`Transaction failed: ${JSON.stringify(send)}`); } let response = await server.getTransaction(send.hash);