From 7ff13067a14e1beeacab6dc6b2dc19681287f277 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 28 Jul 2018 17:53:23 +0200 Subject: [PATCH] Returning the Nonce where it was originally. --- PoloniexAPIClient.js | 5 +++-- Run.js | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/PoloniexAPIClient.js b/PoloniexAPIClient.js index bc6ce916e..fc2dc534a 100644 --- a/PoloniexAPIClient.js +++ b/PoloniexAPIClient.js @@ -18,7 +18,8 @@ // Module dependencies var crypto = require('crypto'), - request = require('request'); + request = require('request'), + nonce = require('nonce')(); // Constants var version = '0.0.8', @@ -121,7 +122,7 @@ parameters || (parameters = {}); parameters.command = command; - parameters.nonce = global.nonce(); + parameters.nonce = nonce(); options = { method: 'POST', diff --git a/Run.js b/Run.js index a93071179..4911e433d 100644 --- a/Run.js +++ b/Run.js @@ -32,8 +32,6 @@ process.on('exit', function (code) { global.USER_PROFILE = {}; global.EMAIL_CONFIG = {}; -global.nonce = require('nonce')(); // We need a nonce generator that is global so that nonce is generated with a lower number in any case. - readStoragePermissions(); function readStoragePermissions() {