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
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 commit5f4184760d, reversing changes made to5e1da9617f. Reverting changes on main
This commit is contained in:
@@ -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)),
|
||||
];
|
||||
Reference in New Issue
Block a user