Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
chore : rename remainingPINAttempts to currentWrongPinAttemptsCount
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlosokumu committed Jan 8, 2025
1 parent ed66516 commit 477b4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/handlers/ussd/menuhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2163,8 +2163,8 @@ func (h *Handlers) resetIncorrectPINAttempts(ctx context.Context, sessionId stri
}
return err
}
remainingPINAttempts, _ := strconv.ParseUint(string(currentWrongPinAttempts), 0, 64)
if remainingPINAttempts <= uint64(common.AllowedPINAttempts) {
currentWrongPinAttemptsCount, _ := strconv.ParseUint(string(currentWrongPinAttempts), 0, 64)
if currentWrongPinAttemptsCount <= uint64(common.AllowedPINAttempts) {
err = store.WriteEntry(ctx, sessionId, common.DATA_INCORRECT_PIN_ATTEMPTS, []byte(string("0")))
if err != nil {
logg.ErrorCtxf(ctx, "failed to reset incorrect PIN attempts ", "key", common.DATA_INCORRECT_PIN_ATTEMPTS, "value", common.AllowedPINAttempts, "error", err)
Expand Down

0 comments on commit 477b4cf

Please sign in to comment.