Addressed PR feedback
This commit is contained in:
parent
b7ca0aaf14
commit
f440995462
|
@ -122,12 +122,9 @@ QtObject:
|
||||||
read = getEnsManager
|
read = getEnsManager
|
||||||
|
|
||||||
proc changePassword(self: ProfileView, password: string, newPassword: string): bool {.slot.} =
|
proc changePassword(self: ProfileView, password: string, newPassword: string): bool {.slot.} =
|
||||||
try:
|
if self.status.accounts.changePassword(self.profile.address, password, newPassword):
|
||||||
if not status_accounts.changeDatabasePassword(self.profile.address, password, newPassword):
|
quit(QuitSuccess) # quits the app TODO: change this to logout instead when supported
|
||||||
return false
|
return false
|
||||||
except:
|
|
||||||
return false
|
|
||||||
quit(QuitSuccess) # quits the app TODO: change this to logout instead when supported
|
|
||||||
|
|
||||||
proc getLinkPreviewWhitelist*(self: ProfileView): string {.slot.} =
|
proc getLinkPreviewWhitelist*(self: ProfileView): string {.slot.} =
|
||||||
result = $(self.status.profile.getLinkPreviewWhitelist())
|
result = $(self.status.profile.getLinkPreviewWhitelist())
|
||||||
|
|
|
@ -76,3 +76,11 @@ proc changeNetwork*(self: AccountModel, fleetConfig: FleetConfig, network: strin
|
||||||
statusGoResult = status_settings.saveSetting(Setting.Stickers_Recent, %* {})
|
statusGoResult = status_settings.saveSetting(Setting.Stickers_Recent, %* {})
|
||||||
if statusGoResult.error != "":
|
if statusGoResult.error != "":
|
||||||
error "Error removing all recent stickers", msg=statusGoResult.error
|
error "Error removing all recent stickers", msg=statusGoResult.error
|
||||||
|
|
||||||
|
proc changePassword*(self: AccountModel, keyUID: string, password: string, newPassword: string): bool =
|
||||||
|
try:
|
||||||
|
if not status_accounts.changeDatabasePassword(keyUID, password, newPassword):
|
||||||
|
return false
|
||||||
|
except:
|
||||||
|
return false
|
||||||
|
return true
|
Loading…
Reference in New Issue