setWalletPassword method
Sets a new password for the wallet.
This method sends a SetWalletPasswordRequest to set a new wallet password.
Example:
await walletsService.setWalletPassword('newPassword', 'currentPassword');
Implementation
Future<void> setWalletPassword(String newPassword, String? password) async {
if (!havenoChannel.isConnected) {
throw DaemonNotConnectedException();
}
try {
await havenoChannel.walletsClient!.setWalletPassword(
SetWalletPasswordRequest(
password: password, newPassword: newPassword));
} on GrpcError catch (e) {
handleGrpcError(e);
}
}