diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-09-23 14:09:07 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-09-23 14:09:18 +0200 |
commit | 5737c121ca3635a4afee0c017b7652eb39ee4ab1 (patch) | |
tree | 61bd0cbab6b85d6c1ab102940fa8cf57f6aafa2f /lib/wallet/wallet.ts | |
parent | d705309199a38cea944583238270a52b8b74204b (diff) |
use uniform DOM event handling mechanism
Diffstat (limited to 'lib/wallet/wallet.ts')
-rw-r--r-- | lib/wallet/wallet.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts index 367c9cbcd..32b85e7b0 100644 --- a/lib/wallet/wallet.ts +++ b/lib/wallet/wallet.ts @@ -720,6 +720,10 @@ export class Wallet { return Query(this.db) .get("reserves", req.reservePub) .then((r) => { + if (!r) { + console.error("Unable to confirm reserve, not found in DB"); + return; + } r.confirmed = true; return Query(this.db) .put("reserves", r) @@ -770,6 +774,7 @@ export class Wallet { } storeCoin(coin: Coin): Promise<void> { + console.log("storing coin", new Date()); let historyEntry = { type: "withdraw", timestamp: (new Date).getTime(), @@ -813,6 +818,9 @@ export class Wallet { let denomsForWithdraw = getWithdrawDenomList(reserve.current_amount, denomsAvailable); + // Number of coins we try to withdraw at once + const concurrency = 1; + let ps = denomsForWithdraw.map((denom) => { console.log("withdrawing", JSON.stringify(denom)); // Do the withdraw asynchronously, so crypto is interleaved |