File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
convex-peer/src/main/java/convex/api Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -527,7 +527,8 @@ public SignedData<ATransaction> prepareTransaction(ATransaction transaction) thr
527
527
* @return A Future for the result of the transaction
528
528
*/
529
529
public CompletableFuture <Result > transact (String code ) {
530
- return transact ((ACell )Reader .read (code ));
530
+ ACell cmd =buildCodeForm (code );
531
+ return transact (cmd );
531
532
}
532
533
533
534
/**
@@ -542,7 +543,8 @@ public synchronized CompletableFuture<Result> transact(ACell code) {
542
543
if (isPreCompile ()) {
543
544
return preCompile (code ).thenCompose (r ->{
544
545
if (r .isError ()) return CompletableFuture .completedFuture (r );
545
- ATransaction trans = Invoke .create (getAddress (), ATransaction .UNKNOWN_SEQUENCE , r .getValue ());
546
+ ACell compiledCode =r .getValue ();
547
+ ATransaction trans = Invoke .create (getAddress (), ATransaction .UNKNOWN_SEQUENCE , compiledCode );
546
548
return transact (trans );
547
549
});
548
550
} else {
@@ -570,7 +572,8 @@ private ACell buildCodeForm(String code) {
570
572
* @throws InterruptedException in case of interrupt while waiting
571
573
*/
572
574
public synchronized Result transactSync (String code ) throws InterruptedException {
573
- ATransaction trans = Invoke .create (getAddress (), ATransaction .UNKNOWN_SEQUENCE , code );
575
+ ACell form =buildCodeForm (code );
576
+ ATransaction trans = Invoke .create (getAddress (), ATransaction .UNKNOWN_SEQUENCE , form );
574
577
return transactSync (trans );
575
578
}
576
579
You can’t perform that action at this time.
0 commit comments