Apply patch [skip ci]

This commit is contained in:
open-swe-dev-andrinoid[bot] 2026-01-22 00:27:12 +00:00
parent 9d32ac4968
commit ee8aa46bbf

View File

@ -30,7 +30,7 @@ export default function PaymentMethodsList(
ProcessedPaymentMethod[]
>([]);
const [isProcessing, setIsProcessing] = useState(false);
const [_isOpeningModal, setIsOpeningModal] = useState(openModal);
const [_isOpeningModal, _setIsOpeningModal] = useState(openModal);
// Process payment methods on component mount and when paymentMethods or userId change
useEffect(() => {
@ -63,7 +63,7 @@ export default function PaymentMethodsList(
const updatedMethods: ProcessedPaymentMethod[] = [];
for (const method of paymentMethods) {
const processedMethod = { ...method };
const processedMethod: ProcessedPaymentMethod = { ...method };
// Decrypt and mask account number
if (method.account_number_encrypted) {
@ -75,8 +75,8 @@ export default function PaymentMethodsList(
if (decryptedData) {
const accountNumber = decryptedData;
// Show only last 4 digits
processedMethod.maskedAccountNumber = "****" +
accountNumber.slice(-4);
processedMethod.maskedAccountNumber =
"****" + accountNumber.slice(-4);
}
} catch (error) {
console.error("Failed to decrypt account number:", error);
@ -93,8 +93,8 @@ export default function PaymentMethodsList(
if (decryptedData) {
const routingNumber = decryptedData;
// Show only last 4 digits
processedMethod.maskedRoutingNumber = "****" +
routingNumber.slice(-4);
processedMethod.maskedRoutingNumber =
"****" + routingNumber.slice(-4);
}
} catch (error) {
console.error("Failed to decrypt routing number:", error);
@ -147,8 +147,7 @@ export default function PaymentMethodsList(
{popupAddPaymentMethodDialog}
<div class="space-y-4">
{processedMethods.length === 0
? (
{processedMethods.length === 0 ? (
<div class="text-center py-12 bg-white rounded-lg shadow">
<svg
xmlns="http://www.w3.org/2000/svg"
@ -172,14 +171,13 @@ export default function PaymentMethodsList(
</p>
<button
type="button"
onClick={() => setIsOpeningModal(true)}
onClick={() => _setIsOpeningModal(true)}
class="bg-blue-600 hover:bg-blue-700 text-white font-semibold py-2 px-6 rounded-lg transition-colors"
>
Add Payment Method
</button>
</div>
)
: (
) : (
<>
<ul class="space-y-4">
{processedMethods.map((method) => (
@ -274,7 +272,7 @@ export default function PaymentMethodsList(
<div class="mt-6">
<button
type="button"
onClick={() => setIsOpeningModal(true)}
onClick={() => _setIsOpeningModal(true)}
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg shadow transition-colors flex items-center justify-center gap-2"
>
<svg