Merge branch 'master' into fix-multiple-alias-requests
This commit is contained in:
		
						commit
						64b42b92ec
					
				@ -243,6 +243,28 @@ func (h *MenuHandlers) CreateAccount(ctx context.Context, sym string, input []by
 | 
			
		||||
	return res, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (h *MenuHandlers) CheckAccountCreated(ctx context.Context, sym string, input []byte) (resource.Result, error) {
 | 
			
		||||
	var res resource.Result
 | 
			
		||||
	flag_account_created, _ := h.flagManager.GetFlag("flag_account_created")
 | 
			
		||||
 | 
			
		||||
	store := h.userdataStore
 | 
			
		||||
 | 
			
		||||
	sessionId, ok := ctx.Value("SessionId").(string)
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return res, fmt.Errorf("missing session")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	_, err := store.ReadEntry(ctx, sessionId, storedb.DATA_PUBLIC_KEY)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		if !db.IsNotFound(err) {
 | 
			
		||||
			return res, err
 | 
			
		||||
		}
 | 
			
		||||
		return res, nil
 | 
			
		||||
	}
 | 
			
		||||
	res.FlagSet = append(res.FlagSet, flag_account_created)
 | 
			
		||||
	return res, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ResetValidPin resets the flag_valid_pin flag.
 | 
			
		||||
func (h *MenuHandlers) ResetValidPin(ctx context.Context, sym string, input []byte) (resource.Result, error) {
 | 
			
		||||
	var res resource.Result
 | 
			
		||||
 | 
			
		||||
@ -128,6 +128,7 @@ func (ls *LocalHandlerService) GetHandler(accountService remote.AccountService)
 | 
			
		||||
	ls.DbRs.AddLocalFunc("request_custom_alias", appHandlers.RequestCustomAlias)
 | 
			
		||||
	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.first = appHandlers.Init
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,7 @@
 | 
			
		||||
LOAD check_blocked_status 1
 | 
			
		||||
RELOAD check_blocked_status
 | 
			
		||||
LOAD check_account_created 2
 | 
			
		||||
RELOAD check_account_created
 | 
			
		||||
CATCH blocked_account flag_account_blocked 1
 | 
			
		||||
CATCH select_language flag_language_set 0
 | 
			
		||||
CATCH terms flag_account_created 0
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user