From 3b4e8e27f4e7f93d6500e805d4cd98825f878dc5 Mon Sep 17 00:00:00 2001 From: Daniela Brozzoni Date: Wed, 7 Sep 2022 12:54:58 +0200 Subject: [PATCH] Format src/index.js --- playground/src/index.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/playground/src/index.js b/playground/src/index.js index 58d8350840..de18abb325 100644 --- a/playground/src/index.js +++ b/playground/src/index.js @@ -1,4 +1,8 @@ -import { WasmWallet, log_init, compile } from "../bdk-cli/target/wasm32-unknown-unknown/release/bdk-cli.js"; +import { + WasmWallet, + log_init, + compile +} from "../bdk-cli/target/wasm32-unknown-unknown/release/bdk-cli.js"; import * as InternalBlockly from "./blockly.js"; async function startWallet(desc, change_desc) { @@ -18,7 +22,7 @@ async function startWallet(desc, change_desc) { args.push(change_desc); } inst = await new WasmWallet("testnet", args); - } catch(e) { + } catch (e) { console.error(e); } @@ -93,8 +97,8 @@ async function startWallet(desc, change_desc) { start_button.disabled = false; stop_button.disabled = true; - const descriptor = document.getElementById("descriptor"); - const change_descriptor = document.getElementById("change_descriptor"); + const descriptor = document.getElementById("descriptor"); + const change_descriptor = document.getElementById("change_descriptor"); start_button.onclick = (e) => { if (descriptor.value.length == 0) { @@ -170,13 +174,16 @@ async function startWallet(desc, change_desc) { const extra = elements_extra.filter((x) => x.attributes["data-index"].value == alias.attributes["data-index"].value)[0].value; const aliasValue = alias.value; - aliases[aliasValue] = { type, extra }; + aliases[aliasValue] = { + type, + extra + }; }); try { let res = compile(policy.value, JSON.stringify(aliases), compiler_script_type.value); compiler_output.innerHTML = res; - } catch(e) { + } catch (e) { compiler_output.innerHTML = `${e}`; } } -- 2.49.0