Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Prev Previous commit
Next Next commit
More work on browser node
  • Loading branch information
tomaka committed Oct 30, 2019
commit 40b0dd11d957b313b79858ebc5fa77d343fbb99f
4 changes: 2 additions & 2 deletions node/cli/browser-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>Substrate node</title>
<link rel="shortcut icon" href="/favicon.png" />
<script type="module">
import { start_client, default as init } from './pkg/node_browser.js';
import { start_client, default as init } from './pkg/node_cli.js';
import ws from './ws.js';

function log(msg) {
Expand All @@ -14,7 +14,7 @@

async function start() {
log('Loading WASM');
await init('./pkg/node_browser_bg.wasm');
await init('./pkg/node_cli_bg.wasm');
log('Successfully loaded WASM');

// Build our client.
Expand Down
2 changes: 1 addition & 1 deletion node/cli/src/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub fn start_client(wasm_ext: wasm_ext::ffi::Transport) -> Result<Client, JsValue> {
start_inner(wasm_ext)
.map_err(|err| JsValue::from_str(err.description()))
.map_err(|err| JsValue::from_str(&err.to_string()))
}

fn start_inner(wasm_ext: wasm_ext::ffi::Transport) -> Result<Client, Box<dyn std::error::Error>> {
Expand Down