From d9ebfcc2f9d2be7fa41c803645676586699a7cdd Mon Sep 17 00:00:00 2001 From: Bucko Date: Tue, 19 Sep 2017 14:28:26 -0700 Subject: [PATCH] coin lock methods weren't handling parameters correctly in http client --- lib/http/client.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/http/client.js b/lib/http/client.js index b9e1ac2a..02755134 100644 --- a/lib/http/client.js +++ b/lib/http/client.js @@ -823,8 +823,8 @@ HTTPClient.prototype.importAddress = function importAddress(id, account, address * @returns {Promise} */ -HTTPClient.prototype.lockCoin = function lockCoin(id, hash, index) { - return this._put(`/wallet/${id}/coin/locked`, { hash, index }); +HTTPClient.prototype.lockCoin = function lockCoin(id, hash, index, passphrase) { + return this._put(`/wallet/${id}/locked/${hash}/${index}`, { passphrase }); }; /** @@ -835,8 +835,8 @@ HTTPClient.prototype.lockCoin = function lockCoin(id, hash, index) { * @returns {Promise} */ -HTTPClient.prototype.unlockCoin = function unlockCoin(id, hash, index) { - return this._del(`/wallet/${id}/coin/locked`, { hash, index }); +HTTPClient.prototype.unlockCoin = function unlockCoin(id, hash, index, passphrase) { + return this._del(`/wallet/${id}/locked/${hash}/${index}`, { passphrase }); }; /** @@ -846,7 +846,7 @@ HTTPClient.prototype.unlockCoin = function unlockCoin(id, hash, index) { */ HTTPClient.prototype.getLocked = function getLocked(id) { - return this._get(`/wallet/${id}/coin/locked`); + return this._get(`/wallet/${id}/locked`); }; /**