check in http client that an id is passed to create wallet

This commit is contained in:
Bucko 2017-08-16 17:58:37 -07:00
parent 58ec9b3fab
commit 64b7e4d0df

View File

@ -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);
};