Compare commits
No commits in common. "82b4365d161ab9e16e0506f61439f4c124a6be96" and "99a4d3ff421f7da6c22e3bba7d155b6f0b82e982" have entirely different histories.
82b4365d16
...
99a4d3ff42
@ -363,7 +363,6 @@ func (h *Handlers) ConfirmPinChange(ctx context.Context, sym string, input []byt
|
||||
hashedPIN, err := common.HashPIN(string(temporaryPin))
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to hash temporaryPin", "error", err)
|
||||
return res, err
|
||||
}
|
||||
|
||||
// save the hashed PIN as the new account PIN
|
||||
@ -408,7 +407,6 @@ func (h *Handlers) VerifyCreatePin(ctx context.Context, sym string, input []byte
|
||||
hashedPIN, err := common.HashPIN(string(temporaryPin))
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to hash temporaryPin", "error", err)
|
||||
return res, err
|
||||
}
|
||||
|
||||
err = store.WriteEntry(ctx, sessionId, common.DATA_ACCOUNT_PIN, []byte(hashedPIN))
|
||||
@ -954,15 +952,7 @@ func (h *Handlers) ResetOthersPin(ctx context.Context, sym string, input []byte)
|
||||
logg.ErrorCtxf(ctx, "failed to read temporaryPin entry with", "key", common.DATA_TEMPORARY_VALUE, "error", err)
|
||||
return res, err
|
||||
}
|
||||
|
||||
// Hash the PIN
|
||||
hashedPIN, err := common.HashPIN(string(temporaryPin))
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to hash temporaryPin", "error", err)
|
||||
return res, err
|
||||
}
|
||||
|
||||
err = store.WriteEntry(ctx, string(blockedPhonenumber), common.DATA_ACCOUNT_PIN, []byte(hashedPIN))
|
||||
err = store.WriteEntry(ctx, string(blockedPhonenumber), common.DATA_ACCOUNT_PIN, []byte(temporaryPin))
|
||||
if err != nil {
|
||||
return res, nil
|
||||
}
|
||||
|
@ -1047,14 +1047,7 @@ func TestAuthorize(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Hash the PIN
|
||||
hashedPIN, err := common.HashPIN(accountPIN)
|
||||
if err != nil {
|
||||
logg.ErrorCtxf(ctx, "failed to hash temporaryPin", "error", err)
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = store.WriteEntry(ctx, sessionId, common.DATA_ACCOUNT_PIN, []byte(hashedPIN))
|
||||
err = store.WriteEntry(ctx, sessionId, common.DATA_ACCOUNT_PIN, []byte(accountPIN))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user