diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-12-16 17:52:25 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-12-16 17:52:25 +0100 |
commit | a16589a5d93fe0767973a8e12e9bdd7e6d8ad55e (patch) | |
tree | 39629a78240ba17c31e495c520dc05b763521083 /extension/popup/balance-overview.js | |
parent | 1c5cb3819718a15523b39f532ff70994eded051f (diff) | |
download | wallet-core-a16589a5d93fe0767973a8e12e9bdd7e6d8ad55e.tar.xz |
Making the balance appear
Diffstat (limited to 'extension/popup/balance-overview.js')
-rw-r--r-- | extension/popup/balance-overview.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/extension/popup/balance-overview.js b/extension/popup/balance-overview.js index 0df0dae9f..f33be0637 100644 --- a/extension/popup/balance-overview.js +++ b/extension/popup/balance-overview.js @@ -19,16 +19,17 @@ document.addEventListener('DOMContentLoaded', (e) => { chrome.runtime.sendMessage({ type: "balances" }, function (wallet) { console.log("got balance"); let n = 0; - /*let table = <div />;*/ + let table = React.createElement("div", null); let source = document.getElementById("balance-template").innerHTML; console.log("size", Object.keys(wallet).length); if (Object.keys(wallet).length > 0) { let template = Handlebars.compile(source); - console.log("DB error? ", chrome.runtime.lastError); console.log("wallet ", JSON.stringify(wallet)); - let html = template({ wallet: wallet, walletEmpty: wallet.length == 0 }); + let html = template(wallet); console.log("Hb generated html", html); - document.getElementById("content").innerHTML = html; + table.innerHTML = html; + let p = document.getElementById("content"); + p.replaceChild(table, p.firstElementChild); } /* for (let curr in wallet) { |