From e5bddcf418cd300c4b532f37d943211aca5301c9 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 21 Jan 2020 17:40:03 +0100 Subject: [PATCH] Key path fixed --- Session.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Session.js b/Session.js index 5fb7b4c8d..9305df9fc 100644 --- a/Session.js +++ b/Session.js @@ -175,11 +175,13 @@ /* This is the primary fallback, when there is no key defined at the parameters at the session level. */ if (bot.TRADING_SYSTEM) { if (bot.TRADING_SYSTEM.parameters) { - if (bot.TRADING_SYSTEM.parameters.key !== undefined) { - let key = bot.TRADING_SYSTEM.parameters.key + if (bot.TRADING_SYSTEM.parameters.keyInstance !== undefined) { + if (bot.TRADING_SYSTEM.parameters.keyInstance.referenceParent !== undefined) { + let key = bot.TRADING_SYSTEM.parameters.keyInstance.referenceParent - process.env.KEY = key.code.name - process.env.SECRET = key.code.secret + process.env.KEY = key.code.codeName + process.env.SECRET = key.code.secret + } } } }