chore: rename countIncorrectPINAttempts to incrementIncorrectPINAttempts

This commit is contained in:
Carlosokumu 2025-01-08 14:51:15 +03:00
parent 477b4cf8f6
commit 2ff9fed3c5
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953
2 changed files with 5 additions and 5 deletions

View File

@ -747,7 +747,7 @@ func (h *Handlers) Authorize(ctx context.Context, sym string, input []byte) (res
}
}
} else {
err := h.countIncorrectPINAttempts(ctx, sessionId)
err := h.incrementIncorrectPINAttempts(ctx, sessionId)
if err != nil {
return res, err
}
@ -2124,8 +2124,8 @@ func (h *Handlers) UpdateAllProfileItems(ctx context.Context, sym string, input
return res, nil
}
// countIncorrectPINAttempts keeps track of the number of incorrect PIN attempts
func (h *Handlers) countIncorrectPINAttempts(ctx context.Context, sessionId string) error {
// incrementIncorrectPINAttempts keeps track of the number of incorrect PIN attempts
func (h *Handlers) incrementIncorrectPINAttempts(ctx context.Context, sessionId string) error {
var pinAttemptsCount uint8
store := h.userdataStore

View File

@ -2247,7 +2247,7 @@ func TestCountIncorrectPINAttempts(t *testing.T) {
if err != nil {
t.Logf(err.Error())
}
err = h.countIncorrectPINAttempts(ctx, sessionId)
err = h.incrementIncorrectPINAttempts(ctx, sessionId)
if err != nil {
t.Logf(err.Error())
}