Skip to content

Commit 5f579b9

Browse files
authored
Update requested changes
Program name, try catch block updates Signed-off-by: Oğuz Utku Yıldız <[email protected]>
1 parent 8666ccf commit 5f579b9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

create-aleo-app/template-vanilla/worker.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
await initThreadPool();
1212

1313
const hello_hello_program =
14-
"program hello_hello_123.aleo;\n" +
14+
"program hello_hello.aleo;\n" +
1515
"\n" +
1616
"function hello:\n" +
1717
" input r0 as u32.public;\n" +
@@ -83,12 +83,13 @@ import {
8383
const result = getPrivateKey();
8484
postMessage(result);
8585
} else if (e.data === "deploy") {
86-
deployProgram(hello_hello_program).then(result => {
86+
try {
87+
const result = await deployProgram(hello_hello_program);
8788
postMessage(result);
88-
}).catch(error => {
89+
} catch (error) {
8990
postMessage({ error: error.message });
90-
});
91+
}
9192
}
9293

9394
};
94-
95+

0 commit comments

Comments
 (0)