summaryrefslogtreecommitdiff
path: root/src/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-20 16:20:32 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-20 16:20:32 +0530
commitd331f8b8b66e52a645dedefa7b7c31740dc309dc (patch)
treeea531549f67b23371b11c1e27361adc6356a9647 /src/wallet.ts
parenta2e7f216277bd8cb722b9662ed1d2d44f927de0d (diff)
downloadwallet-core-d331f8b8b66e52a645dedefa7b7c31740dc309dc.tar.gz
wallet-core-d331f8b8b66e52a645dedefa7b7c31740dc309dc.tar.bz2
wallet-core-d331f8b8b66e52a645dedefa7b7c31740dc309dc.zip
no more wildcard notifications
Diffstat (limited to 'src/wallet.ts')
-rw-r--r--src/wallet.ts15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/wallet.ts b/src/wallet.ts
index 5412a0fd2..9df279897 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -364,9 +364,20 @@ export class Wallet {
try {
await this.processOnePendingOperation(p);
} catch (e) {
- console.error(e);
+ if (e instanceof OperationFailedAndReportedError) {
+ logger.warn("operation processed resulted in reported error");
+ } else {
+ console.error("Uncaught exception", e);
+ this.ws.notify({
+ type: NotificationType.InternalError,
+ message: "uncaught exception",
+ exception: e,
+ });
+ }
}
- this.ws.notify({ type: NotificationType.Wildcard });
+ this.ws.notify({
+ type: NotificationType.PendingOperationProcessed,
+ });
}
}
}