Merge remote-tracking branch 'refs/remotes/origin/wip-flag-migration' into wip-flag-migration

This commit is contained in:
Carlosokumu 2024-09-02 17:12:01 +03:00
commit 1c1ea74088
Signed by untrusted user: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -247,12 +247,12 @@ func (h *Handlers) VerifyPin(ctx context.Context, sym string, input []byte) (res
if err != nil { if err != nil {
return res, err return res, err
} }
storedpin, err := h.db.Fetch([]byte(AccountPin))
AccountPin, err := h.db.Fetch([]byte(AccountPin))
if err != nil { if err != nil {
return res, err return res, err
} }
if bytes.Equal(input, AccountPin) {
if bytes.Equal(input, storedpin) {
res.FlagSet = []uint32{flags["flag_valid_pin"]} res.FlagSet = []uint32{flags["flag_valid_pin"]}
res.FlagReset = []uint32{flags["flag_pin_mismatch"]} res.FlagReset = []uint32{flags["flag_pin_mismatch"]}
res.FlagSet = append(res.FlagSet, flags["flag_pin_set"]) res.FlagSet = append(res.FlagSet, flags["flag_pin_set"])