Merge pull request #279 from Bucko13/check-for-id-param
check in http client that an id is passed to create wallet
This commit is contained in:
commit
d44d93486f
@ -6,7 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
const assert = require('assert');
|
||||||
const Network = require('../protocol/network');
|
const Network = require('../protocol/network');
|
||||||
const AsyncObject = require('../utils/asyncobject');
|
const AsyncObject = require('../utils/asyncobject');
|
||||||
const RPCClient = require('./rpcclient');
|
const RPCClient = require('./rpcclient');
|
||||||
@ -493,6 +493,7 @@ HTTPClient.prototype.getWallets = function getWallets() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
HTTPClient.prototype.createWallet = function createWallet(options) {
|
HTTPClient.prototype.createWallet = function createWallet(options) {
|
||||||
|
assert(options.id, 'Must pass an id parameter')
|
||||||
return this._put(`/wallet/${options.id}`, options);
|
return this._put(`/wallet/${options.id}`, options);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user