diff --git a/frontend/src/components/PaymentMethods/StringAsIcons.tsx b/frontend/src/components/PaymentMethods/StringAsIcons.tsx index ac70ad02..c9aa4eea 100644 --- a/frontend/src/components/PaymentMethods/StringAsIcons.tsx +++ b/frontend/src/components/PaymentMethods/StringAsIcons.tsx @@ -33,10 +33,10 @@ const StringAsIcons: React.FC = ({ // 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)) { - customMethods = customMethods.replace(regex, ''); + if (regex.test(customMethods.toLowerCase())) { + customMethods = customMethods.replace(method.name, ''); rows.push(