Skip to content

Commit 0916fd7

Browse files
author
Damien LACHAUME / PALO-IT
committed
Adapt JS implementation example with --target web option
1 parent 73cb607 commit 0916fd7

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

mithril-client-wasm/www/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// TODO: improve the management of function returned values by adding an event mechanism
2-
// Errors should be handled too.
3-
4-
import { MithrilClient } from "@mithril-dev/mithril-client-wasm"
1+
import initMithrilClient, { MithrilClient } from "@mithril-dev/mithril-client-wasm"
52

63
let aggregator_endpoint =
74
"https://aggregator.testing-preview.api.mithril.network/aggregator"
@@ -36,7 +33,9 @@ function displayStepInDOM(number, content) {
3633
document.body.appendChild(div);
3734
}
3835

39-
let client = await new MithrilClient(
36+
await initMithrilClient();
37+
38+
let client = new MithrilClient(
4039
aggregator_endpoint,
4140
genesis_verification_key
4241
)

mithril-client-wasm/www/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)