From 69962db97e4dee3c8823ab11273bb8733e94c48c Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Mon, 9 Sep 2019 10:37:07 -0400 Subject: [PATCH] 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. --- lib/swaps/Swaps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/swaps/Swaps.ts b/lib/swaps/Swaps.ts index 2d1e8f27e..6a29d84b2 100644 --- a/lib/swaps/Swaps.ts +++ b/lib/swaps/Swaps.ts @@ -907,9 +907,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) {