diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-07-20 16:20:32 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-07-20 16:20:32 +0530 |
commit | d331f8b8b66e52a645dedefa7b7c31740dc309dc (patch) | |
tree | ea531549f67b23371b11c1e27361adc6356a9647 /src/operations/withdraw.ts | |
parent | a2e7f216277bd8cb722b9662ed1d2d44f927de0d (diff) | |
download | wallet-core-d331f8b8b66e52a645dedefa7b7c31740dc309dc.tar.xz |
no more wildcard notifications
Diffstat (limited to 'src/operations/withdraw.ts')
-rw-r--r-- | src/operations/withdraw.ts | 5 |
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( |