Skip to content

Commit d5b0fed

Browse files
committed
fix(swapclientmanager): catch genseed errors
This fixes the error handling around the call to `genSeed` to actually catch errors thrown from the method. Previously, the method returned before any error could be caught.
1 parent e1ee78a commit d5b0fed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/swaps/SwapClientManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ class SwapClientManager extends EventEmitter {
113113
for (const swapClient of this.swapClients.values()) {
114114
if (isLndClient(swapClient) && swapClient.isWaitingUnlock()) {
115115
try {
116-
return swapClient.genSeed();
116+
const seed = await swapClient.genSeed();
117+
return seed;
117118
} catch (err) {
118119
swapClient.logger.error('could not generate seed', err);
119120
}

0 commit comments

Comments
 (0)