aboutsummaryrefslogtreecommitdiff
path: root/src/operations/reserves.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-24 00:22:46 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-24 00:22:46 +0530
commit5b8924b8cfe14909b778ec096b3d893a9dde8533 (patch)
treee5ec34d1bf1e0f99be3cfdc582824de3b7cdc299 /src/operations/reserves.ts
parent56ece296e0e13de3c796a4ac317c6ce9e4fd7c28 (diff)
downloadwallet-core-5b8924b8cfe14909b778ec096b3d893a9dde8533.tar.xz
logging
Diffstat (limited to 'src/operations/reserves.ts')
-rw-r--r--src/operations/reserves.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/operations/reserves.ts b/src/operations/reserves.ts
index 51499e448..6045b61d2 100644
--- a/src/operations/reserves.ts
+++ b/src/operations/reserves.ts
@@ -240,12 +240,18 @@ export async function createReserve(
},
);
- ws.notify({ type: NotificationType.ReserveCreated });
+ if (reserveRecord.reservePub === resp.reservePub) {
+ // Only emit notification when a new reserve was created.
+ ws.notify({
+ type: NotificationType.ReserveCreated,
+ reservePub: reserveRecord.reservePub,
+ });
+ }
// Asynchronously process the reserve, but return
// to the caller already.
processReserve(ws, resp.reservePub, true).catch((e) => {
- console.error("Processing reserve (after createReserve) failed:", e);
+ logger.error("Processing reserve (after createReserve) failed:", e);
});
return resp;
@@ -318,7 +324,6 @@ async function registerReserveWithBank(
return;
}
const bankStatusUrl = bankInfo.statusUrl;
- console.log("making selection");
if (reserve.timestampReserveInfoPosted) {
throw Error("bank claims that reserve info selection is not done");
}
@@ -788,7 +793,6 @@ export async function createTalerWithdrawReserve(
// We do this here, as the reserve should be registered before we return,
// so that we can redirect the user to the bank's status page.
await processReserveBankStatus(ws, reserve.reservePub);
- console.log("acceptWithdrawal: returning");
return {
reservePub: reserve.reservePub,
confirmTransferUrl: withdrawInfo.confirmTransferUrl,