aboutsummaryrefslogtreecommitdiff
path: root/src/operations/withdraw.ts
diff options
context:
space:
mode:
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(