From 46e4685790bca753653eb69a3963639de3f4418c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 1 Apr 2019 12:54:24 +0200 Subject: [PATCH] Bug fixed> when there was a hole and no trades can be get from before the last known good id --- Hole-Fixing/User.Bot.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Hole-Fixing/User.Bot.js b/Hole-Fixing/User.Bot.js index fab1d119c..1d28ea08a 100644 --- a/Hole-Fixing/User.Bot.js +++ b/Hole-Fixing/User.Bot.js @@ -1065,6 +1065,13 @@ if (FULL_LOG === true) { logger.write(MODULE_NAME, "[INFO] start -> tradesReadyToBeSaved -> nextRecord -> Entering function."); } + if (filesToSave.length === 0) { + + logger.write(MODULE_NAME, "[INFO] start -> tradesReadyToBeSaved -> nextRecord -> No file to save."); + controlLoop(); + return + } + let fileName = '' + market.assetA + '_' + market.assetB + '.json'; date = new Date(filesToSave[i].datetime * 60 * 1000);