Compare commits
No commits in common. "9674a04cbc7e1519e8f250515394c3ea2f7b4b69" and "eaa89c29df360188d3141f06639d33e71ca66c1b" have entirely different histories.
9674a04cbc
...
eaa89c29df
@ -487,14 +487,6 @@ func (h *MenuHandlers) ResetInvalidPIN(ctx context.Context, sym string, input []
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// ResetApiCallFailure resets the api call failure flag
|
||||
func (h *MenuHandlers) ResetApiCallFailure(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||
var res resource.Result
|
||||
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
|
||||
res.FlagReset = append(res.FlagReset, flag_api_error)
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// ConfirmPinChange validates user's new PIN. If input matches the temporary PIN, saves it as the new account PIN.
|
||||
func (h *MenuHandlers) ConfirmPinChange(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||
var res resource.Result
|
||||
@ -2516,8 +2508,6 @@ func (h *MenuHandlers) RequestCustomAlias(ctx context.Context, sym string, input
|
||||
return res, nil
|
||||
}
|
||||
|
||||
flag_api_error, _ := h.flagManager.GetFlag("flag_api_call_error")
|
||||
|
||||
store := h.userdataStore
|
||||
aliasHint, err := store.ReadEntry(ctx, sessionId, storedb.DATA_TEMPORARY_VALUE)
|
||||
if err != nil {
|
||||
@ -2541,12 +2531,9 @@ func (h *MenuHandlers) RequestCustomAlias(ctx context.Context, sym string, input
|
||||
sanitizedInput := sanitizeAliasHint(string(input))
|
||||
aliasResult, err := h.accountService.RequestAlias(ctx, string(pubKey), sanitizedInput)
|
||||
if err != nil {
|
||||
res.FlagSet = append(res.FlagSet, flag_api_error)
|
||||
logg.ErrorCtxf(ctx, "failed to retrieve alias", "alias", string(aliasHint), "error_alias_request", err)
|
||||
return res, nil
|
||||
return res, fmt.Errorf("Failed to retrieve alias: %s", err.Error())
|
||||
}
|
||||
res.FlagReset = append(res.FlagReset, flag_api_error)
|
||||
|
||||
alias := aliasResult.Alias
|
||||
logg.InfoCtxf(ctx, "Suggested alias ", "alias", alias)
|
||||
|
||||
|
@ -129,7 +129,6 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountService)
|
||||
ls.DbRs.AddLocalFunc("get_suggested_alias", appHandlers.GetSuggestedAlias)
|
||||
ls.DbRs.AddLocalFunc("confirm_new_alias", appHandlers.ConfirmNewAlias)
|
||||
ls.DbRs.AddLocalFunc("check_account_created", appHandlers.CheckAccountCreated)
|
||||
ls.DbRs.AddLocalFunc("reset_api_call_failure", appHandlers.ResetApiCallFailure)
|
||||
|
||||
ls.first = appHandlers.Init
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
LOAD reset_api_call_failure 6
|
||||
RELOAD reset_api_call_failure
|
||||
MOUT retry 1
|
||||
MOUT quit 9
|
||||
HALT
|
||||
|
@ -5,5 +5,4 @@ HALT
|
||||
INCMP _ 0
|
||||
LOAD request_custom_alias 0
|
||||
RELOAD request_custom_alias
|
||||
CATCH api_failure flag_api_call_error 1
|
||||
INCMP confirm_new_alias *
|
||||
|
Loading…
Reference in New Issue
Block a user