coin lock methods weren't handling parameters correctly in http client
This commit is contained in:
parent
e3ac717ada
commit
d9ebfcc2f9
@ -823,8 +823,8 @@ HTTPClient.prototype.importAddress = function importAddress(id, account, address
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HTTPClient.prototype.lockCoin = function lockCoin(id, hash, index) {
|
HTTPClient.prototype.lockCoin = function lockCoin(id, hash, index, passphrase) {
|
||||||
return this._put(`/wallet/${id}/coin/locked`, { hash, index });
|
return this._put(`/wallet/${id}/locked/${hash}/${index}`, { passphrase });
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -835,8 +835,8 @@ HTTPClient.prototype.lockCoin = function lockCoin(id, hash, index) {
|
|||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HTTPClient.prototype.unlockCoin = function unlockCoin(id, hash, index) {
|
HTTPClient.prototype.unlockCoin = function unlockCoin(id, hash, index, passphrase) {
|
||||||
return this._del(`/wallet/${id}/coin/locked`, { hash, index });
|
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) {
|
HTTPClient.prototype.getLocked = function getLocked(id) {
|
||||||
return this._get(`/wallet/${id}/coin/locked`);
|
return this._get(`/wallet/${id}/locked`);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user