summaryrefslogtreecommitdiff
path: root/src/operations/withdraw.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/operations/withdraw.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/operations/withdraw.ts')
-rw-r--r--src/operations/withdraw.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/operations/withdraw.ts b/src/operations/withdraw.ts
index ff618b894..19b470e83 100644
--- a/src/operations/withdraw.ts
+++ b/src/operations/withdraw.ts
@@ -489,7 +489,6 @@ export async function selectWithdrawalDenoms(
}
} while (selectedDenoms.selectedDenoms.length > 0 && !allValid);
-
if (Amounts.cmp(selectedDenoms.totalWithdrawCost, amount) > 0) {
throw Error("Bug: withdrawal coin selection is wrong");
}
@@ -515,7 +514,9 @@ async function incrementWithdrawalRetry(
wsr.lastError = err;
await tx.put(Stores.withdrawalGroups, wsr);
});
- ws.notify({ type: NotificationType.WithdrawOperationError });
+ if (err) {
+ ws.notify({ type: NotificationType.WithdrawOperationError, error: err });
+ }
}
export async function processWithdrawGroup(