Revert "Merge branch 'devKA' into devka (resolve conflicts)"
Some checks are pending
ci/woodpecker/push/bump_version Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/frontend Pipeline is running
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline is running

This reverts commit 5f4184760d, reversing
changes made to 5e1da9617f.

Reverting changes on main
This commit is contained in:
Arseni
2025-12-04 15:38:01 +03:00
parent 5f4184760d
commit 3b04753f4e
7 changed files with 126 additions and 308 deletions

View File

@@ -1,53 +0,0 @@
import 'package:pweb/app/router/pages.dart';
import 'package:pweb/widgets/sidebar/destinations.dart';
const _payoutBasePath = Pages.dashboard;
String payoutPath(PayoutDestination destination) {
final base = routerPage(_payoutBasePath);
switch (destination) {
case PayoutDestination.dashboard:
return base;
case PayoutDestination.recipients:
return '$base/recipients';
case PayoutDestination.addrecipient:
return '$base/recipients/add';
case PayoutDestination.payment:
return '$base/payment';
case PayoutDestination.settings:
return '$base/settings';
case PayoutDestination.reports:
return '$base/reports';
case PayoutDestination.methods:
return '$base/methods';
case PayoutDestination.editwallet:
return '$base/methods/edit';
case PayoutDestination.sendPayout:
return '$base/send';
}
}
PayoutDestination payoutDestinationFromLocation(String location) {
final path = Uri.parse(location).path;
// Check longer paths first to avoid prefix collisions.
for (final entry in _orderedRoutes) {
if (path.startsWith(entry.value)) return entry.key;
}
return PayoutDestination.dashboard;
}
final List<MapEntry<PayoutDestination, String>> _orderedRoutes = [
MapEntry(PayoutDestination.editwallet, payoutPath(PayoutDestination.editwallet)),
MapEntry(PayoutDestination.addrecipient, payoutPath(PayoutDestination.addrecipient)),
MapEntry(PayoutDestination.payment, payoutPath(PayoutDestination.payment)),
MapEntry(PayoutDestination.recipients, payoutPath(PayoutDestination.recipients)),
MapEntry(PayoutDestination.methods, payoutPath(PayoutDestination.methods)),
MapEntry(PayoutDestination.reports, payoutPath(PayoutDestination.reports)),
MapEntry(PayoutDestination.settings, payoutPath(PayoutDestination.settings)),
MapEntry(PayoutDestination.sendPayout, payoutPath(PayoutDestination.sendPayout)),
MapEntry(PayoutDestination.dashboard, payoutPath(PayoutDestination.dashboard)),
];