GODT-2022: Fix change between address modes

This commit is contained in:
James Houlahan
2022-11-02 12:49:40 +01:00
parent 0812491f09
commit bc7912e8fb
10 changed files with 83 additions and 18 deletions

View File

@ -265,7 +265,16 @@ func (f *frontendCLI) changeMode(c *ishell.Context) {
targetMode = vault.CombinedMode
}
if !f.yesNoQuestion("Are you sure you want to change the mode for account " + bold(user.Username) + " to " + bold(targetMode)) {
var targetModeName string
switch targetMode {
case vault.CombinedMode:
targetModeName = "combined"
case vault.SplitMode:
targetModeName = "split"
}
if !f.yesNoQuestion("Are you sure you want to change the mode for account " + bold(user.Username) + " to " + bold(targetModeName)) {
return
}
@ -273,7 +282,7 @@ func (f *frontendCLI) changeMode(c *ishell.Context) {
f.printAndLogError("Cannot switch address mode:", err)
}
f.Printf("Address mode for account %s changed to %s\n", user.Username, targetMode)
f.Printf("Address mode for account %s changed to %s\n", user.Username, targetModeName)
}
func (f *frontendCLI) configureAppleMail(c *ishell.Context) {