diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-12-16 10:45:16 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-12-16 10:45:16 +0100 |
commit | 276f9108ab1dac3b7fc6670b1061f8cf7809785a (patch) | |
tree | f8d7fe273c6fc710da7317833d9961912a17fe55 /extension/background/wallet.js | |
parent | 1b295d0f1aa18ece305fdc96cc356bfc2e794934 (diff) |
missing files
Diffstat (limited to 'extension/background/wallet.js')
-rw-r--r-- | extension/background/wallet.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/extension/background/wallet.js b/extension/background/wallet.js index e5740e3b8..36d3e8a85 100644 --- a/extension/background/wallet.js +++ b/extension/background/wallet.js @@ -136,12 +136,13 @@ function withdrawPrepare(db, denom, reserve) { amountWithFee.add(new Amount(denom.fee_withdraw)); let withdrawFee = new Amount(denom.fee_withdraw); // Signature - let withdrawRequest = new WithdrawRequestPS(); - withdrawRequest.set("reserve_pub", reservePub); - withdrawRequest.set("amount_with_fee", amountWithFee.toNbo()); - withdrawRequest.set("withdraw_fee", withdrawFee.toNbo()); - withdrawRequest.set("h_denomination_pub", denomPub.encode().hash()); - withdrawRequest.set("h_coin_envelope", ev.hash()); + let withdrawRequest = new WithdrawRequestPS({ + reserve_pub: reservePub, + amount_with_fee: amountWithFee.toNbo(), + withdraw_fee: withdrawFee.toNbo(), + h_denomination_pub: denomPub.encode().hash(), + h_coin_envelope: ev.hash() + }); console.log("about to sign"); var sig = eddsaSign(withdrawRequest.toPurpose(), reservePriv); console.log("signed"); @@ -392,12 +393,14 @@ function dumpDb(db, detail, sendResponse) { } return true; } +// Just for debugging. function reset(db, detail, sendResponse) { let tx = db.transaction(db.objectStoreNames, 'readwrite'); for (let i = 0; i < db.objectStoreNames.length; i++) { tx.objectStore(db.objectStoreNames[i]).clear(); } indexedDB.deleteDatabase(DB_NAME); + chrome.browserAction.setBadgeText({ text: "" }); console.log("reset done"); return false; } |