Skip to content

Commit

Permalink
fix: [IOBP-910] PSP Sorting by onUs, fee amount and psp name ascending (
Browse files Browse the repository at this point in the history
  • Loading branch information
Hantex9 authored Oct 15, 2024
1 parent f7db571 commit 8d4979a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ts/features/payments/common/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,18 @@ export const getSortedPspList = (
case "name":
return _.orderBy(pspList, psp => psp.pspBusinessName);
case "amount":
return _.orderBy(pspList, psp => psp.taxPayerFee);
return _.orderBy(
pspList,
["taxPayerFee", "pspBusinessName"],
["asc", "asc"]
);
case "default":
default:
return _.orderBy(pspList, ["onUs", "taxPayerFee"], ["desc", "asc"]);
return _.orderBy(
pspList,
["onUs", "taxPayerFee", "pspBusinessName"],
["desc", "asc", "asc"]
);
}
};

Expand Down

0 comments on commit 8d4979a

Please sign in to comment.