Skip to content

Commit

Permalink
fix: OFAC Sanction Modal Check
Browse files Browse the repository at this point in the history
  • Loading branch information
HrithikSampson committed Sep 21, 2024
1 parent 961a8e6 commit 7235001
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/context/donate.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ export const DonateProvider: FC<IProviderProps> = ({ children, project }) => {
(modalChecked: DonateModalPriorityValues): void => {
if (
highestModalPriorityUnchecked.current != 'All Checked' &&
modalChecked > highestModalPriorityUnchecked.current
(modalChecked <= highestModalPriorityUnchecked.current ||
highestModalPriorityUnchecked.current ===
DonateModalPriorityValues.None)
) {
isModalStatusChecked.current.set(modalChecked, true);
let highestModalStatusUnchecked =
Expand All @@ -163,8 +165,9 @@ export const DonateProvider: FC<IProviderProps> = ({ children, project }) => {
highestModalStatusUnchecked = modalStatus;
}
isAllChecked =
isAllChecked &&
!!isModalStatusChecked.current.get(modalStatus);
(isAllChecked &&
!!isModalStatusChecked.current.get(modalStatus)) ||
modalStatus === DonateModalPriorityValues.None;
}
highestModalPriorityUnchecked.current = isAllChecked
? 'All Checked'
Expand Down

0 comments on commit 7235001

Please sign in to comment.