coin lock methods weren't handling parameters correctly in http client

This commit is contained in:
Bucko 2017-09-19 14:28:26 -07:00
parent e3ac717ada
commit d9ebfcc2f9

View File

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