diff --git a/convex-peer/src/main/java/convex/api/Convex.java b/convex-peer/src/main/java/convex/api/Convex.java index 05a1fde08..7d6d83858 100644 --- a/convex-peer/src/main/java/convex/api/Convex.java +++ b/convex-peer/src/main/java/convex/api/Convex.java @@ -527,7 +527,8 @@ public SignedData prepareTransaction(ATransaction transaction) thr * @return A Future for the result of the transaction */ public CompletableFuture transact(String code) { - return transact((ACell)Reader.read(code)); + ACell cmd=buildCodeForm(code); + return transact(cmd); } /** @@ -542,7 +543,8 @@ public synchronized CompletableFuture transact(ACell code) { if (isPreCompile()) { return preCompile(code).thenCompose(r->{ if (r.isError()) return CompletableFuture.completedFuture(r); - ATransaction trans = Invoke.create(getAddress(), ATransaction.UNKNOWN_SEQUENCE, r.getValue()); + ACell compiledCode=r.getValue(); + ATransaction trans = Invoke.create(getAddress(), ATransaction.UNKNOWN_SEQUENCE, compiledCode); return transact(trans); }); } else { @@ -570,7 +572,8 @@ private ACell buildCodeForm(String code) { * @throws InterruptedException in case of interrupt while waiting */ public synchronized Result transactSync(String code) throws InterruptedException { - ATransaction trans = Invoke.create(getAddress(), ATransaction.UNKNOWN_SEQUENCE, code); + ACell form=buildCodeForm(code); + ATransaction trans = Invoke.create(getAddress(), ATransaction.UNKNOWN_SEQUENCE, form); return transactSync(trans); }