mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-07-22 14:30:51 -04:00
accountService.changePassword() requires old and new password
This commit is contained in:
parent
6719324d9e
commit
5a7ec350ca
2 changed files with 19 additions and 7 deletions
|
@ -301,9 +301,12 @@ export default class HavenoClient {
|
|||
*
|
||||
* @param {string} password - the new account password
|
||||
*/
|
||||
async changePassword(password: string): Promise<void> {
|
||||
async changePassword(oldPassword: string, newPassword: string): Promise<void> {
|
||||
try {
|
||||
await this._accountClient.changePassword(new ChangePasswordRequest().setPassword(password), {password: this._password});
|
||||
const request = new ChangePasswordRequest()
|
||||
.setOldPassword(oldPassword)
|
||||
.setNewPassword(newPassword);
|
||||
await this._accountClient.changePassword(request, {password: this._password});
|
||||
} catch (e: any) {
|
||||
throw new HavenoError(e.message, e.code);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue