Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions components/Card/ManagePinForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ import {
import { withRefreshToken } from '@/lib/utils/utils';

function isSimpleSequence(pin: string): boolean {
let ascending = true;
let descending = true;
for (let i = 1; i < pin.length; i++) {
if (parseInt(pin[i]) !== parseInt(pin[i - 1]) + 1) return false;
if (parseInt(pin[i]) !== parseInt(pin[i - 1]) + 1) ascending = false;
if (parseInt(pin[i]) !== parseInt(pin[i - 1]) - 1) descending = false;
}
return true;
return ascending || descending;
}

function isRepeatedDigits(pin: string): boolean {
Expand Down Expand Up @@ -75,6 +78,8 @@ export default function ManagePinForm() {
);
},
retry: false,
gcTime: 0,
staleTime: 0,
});

const hasExistingPin = !!existingPin;
Expand Down
Loading