Files
sendico/frontend/pweb/lib/utils/payment/availability.dart
2026-01-29 19:22:30 +03:00

27 lines
666 B
Dart

import 'package:pshared/models/payment/methods/data.dart';
import 'package:pshared/models/payment/type.dart';
const List<PaymentType> enabledPaymentTypes = [
PaymentType.card,
PaymentType.ledger,
PaymentType.externalChain,
];
const List<PaymentType> previewPaymentTypes = [
PaymentType.bankAccount,
];
const List<PaymentType> visiblePaymentTypes = [
...enabledPaymentTypes,
...previewPaymentTypes,
];
const Set<PaymentType> disabledPaymentTypes = {
PaymentType.bankAccount,
};
MethodMap filterVisiblePaymentTypes(MethodMap source) => {
for (final type in visiblePaymentTypes)
if (source.containsKey(type)) type: source[type],
};