Skip to content

Commit 69962db

Browse files
sangamanmichael1011
authored andcommitted
fix: log error message reason correctly (#1209)
This is a minor fix for logging the swap failure error message. The logic on whether to log the error message was backwards, logging it only when undefined.
1 parent 876335e commit 69962db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/swaps/Swaps.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,9 +907,9 @@ class Swaps extends EventEmitter {
907907
}
908908

909909
if (errorMessage) {
910-
this.logger.debug(`deal ${deal.rHash} failed due to ${SwapFailureReason[failureReason]}`);
911-
} else {
912910
this.logger.debug(`deal ${deal.rHash} failed due to ${SwapFailureReason[failureReason]}: ${errorMessage}`);
911+
} else {
912+
this.logger.debug(`deal ${deal.rHash} failed due to ${SwapFailureReason[failureReason]}`);
913913
}
914914

915915
switch (failureReason) {

0 commit comments

Comments
 (0)