Compare commits
No commits in common. "799d1a51fafd495b7df01ea04d7f245a9a0f11ea" and "b70d6b54d15be9639dd88f817030d756967c0852" have entirely different histories.
799d1a51fa
...
b70d6b54d1
@ -182,20 +182,13 @@ func (h *MenuHandlers) SetAccountFlags(ctx context.Context, sym string, input []
|
||||
res.FlagSet = append(res.FlagSet, flag_account_created)
|
||||
|
||||
// check language status
|
||||
code, err := store.ReadEntry(ctx, sessionId, storedb.DATA_INITIAL_LANGUAGE_CODE)
|
||||
code, err := store.ReadEntry(ctx, sessionId, storedb.DATA_SELECTED_LANGUAGE_CODE)
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to read language code entry with", "key", storedb.DATA_SELECTED_LANGUAGE_CODE, "error", err)
|
||||
return res, nil
|
||||
}
|
||||
|
||||
codeStr := string(code)
|
||||
|
||||
// fallback for unsupported languages
|
||||
if codeStr != "eng" && codeStr != "swa" {
|
||||
codeStr = "swa"
|
||||
}
|
||||
|
||||
res.Content = codeStr
|
||||
res.Content = string(code)
|
||||
|
||||
res.FlagSet = append(res.FlagSet, state.FLAG_LANG)
|
||||
res.FlagSet = append(res.FlagSet, flag_language_set)
|
||||
@ -213,7 +206,7 @@ func (h *MenuHandlers) SetAccountFlags(ctx context.Context, sym string, input []
|
||||
currentWrongPinAttempts, err := store.ReadEntry(ctx, sessionId, storedb.DATA_INCORRECT_PIN_ATTEMPTS)
|
||||
if err != nil {
|
||||
if !db.IsNotFound(err) {
|
||||
return res, nil
|
||||
return res, err
|
||||
}
|
||||
}
|
||||
pinAttemptsValue, _ := strconv.ParseUint(string(currentWrongPinAttempts), 0, 64)
|
||||
|
Loading…
Reference in New Issue
Block a user