Skip to content

Commit

Permalink
fix: log error message reason correctly (#1209)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sangaman committed Sep 11, 2019
1 parent 1ba62c1 commit 3b33535
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/swaps/Swaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -935,9 +935,9 @@ class Swaps extends EventEmitter {
}

if (errorMessage) {
this.logger.debug(`deal ${deal.rHash} failed due to ${SwapFailureReason[failureReason]}`);
} else {
this.logger.debug(`deal ${deal.rHash} failed due to ${SwapFailureReason[failureReason]}: ${errorMessage}`);
} else {
this.logger.debug(`deal ${deal.rHash} failed due to ${SwapFailureReason[failureReason]}`);
}

switch (failureReason) {
Expand Down

0 comments on commit 3b33535

Please sign in to comment.