From 64b7e4d0df0c1c7a7ff9e1922feac558af3af324 Mon Sep 17 00:00:00 2001 From: Bucko Date: Wed, 16 Aug 2017 17:58:37 -0700 Subject: [PATCH] check in http client that an id is passed to create wallet --- lib/http/client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/http/client.js b/lib/http/client.js index 6d7c6d15..d839553d 100644 --- a/lib/http/client.js +++ b/lib/http/client.js @@ -6,7 +6,7 @@ */ 'use strict'; - +const assert = require('assert'); const Network = require('../protocol/network'); const AsyncObject = require('../utils/asyncobject'); const RPCClient = require('./rpcclient'); @@ -471,6 +471,7 @@ HTTPClient.prototype.getWallets = function getWallets() { */ HTTPClient.prototype.createWallet = function createWallet(options) { + assert(options.id, 'Must pass an id parameter') return this._put(`/wallet/${options.id}`, options); };