From a7ce9bc911b44071f660a4c88ab0e7d655622cc0 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Mon, 9 Sep 2019 09:22:02 -0400 Subject: [PATCH] fix: log error message reason correctly 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) {