Normalize payment method names

This commit is contained in:
aftermath2
2023-04-01 12:00:00 +00:00
parent cc5239b5fc
commit 262891c22c

View File

@ -33,9 +33,9 @@ const StringAsIcons: React.FC<StringAsIconsProps> = ({
// Adds icons for each PaymentMethod that matches
methods.forEach((method, i) => {
const regex = new RegExp(`\\b${method.name}\\b`, 'g');
const regex = new RegExp(`\\b${method.name.toLowerCase()}\\b`, 'g');
if (regex.test(customMethods)) {
if (regex.test(customMethods.toLowerCase())) {
customMethods = customMethods.replace(regex, '');
rows.push(
<Tooltip