From d331f8b8b66e52a645dedefa7b7c31740dc309dc Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 20 Jul 2020 16:20:32 +0530 Subject: no more wildcard notifications --- src/operations/withdraw.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/operations/withdraw.ts') 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( -- cgit v1.2.3