From e1f4045f911ef8997dc8658dc78d4237e97d56ba Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Sat, 21 Nov 2020 20:27:50 -0700 Subject: [PATCH] Fix rpc --- lib/jsonrpc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jsonrpc.js b/lib/jsonrpc.js index 7b680dd..710d7cd 100644 --- a/lib/jsonrpc.js +++ b/lib/jsonrpc.js @@ -51,8 +51,8 @@ Client.prototype.call = function(method, params, callback, errback, path) { } // use HTTP auth if user and password set - if (this.opts.user && this.opts.pass) { - requestOptions.auth = this.opts.user + ':' + this.opts.pass; + if (this.opts.username && this.opts.password) { + requestOptions.auth = this.opts.username + ':' + this.opts.password; } // Now we'll make a request to the server