refactoring for recipient addition page

This commit is contained in:
Arseni
2026-01-29 19:22:30 +03:00
parent da8da04ae9
commit efa69b43b2
47 changed files with 1376 additions and 532 deletions

View File

@@ -0,0 +1,26 @@
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],
};