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,159 +0,0 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'package:pweb/app/router/pages.dart';
|
||||
import 'package:pweb/app/router/payout_routes.dart';
|
||||
import 'package:pweb/pages/address_book/form/page.dart';
|
||||
import 'package:pweb/pages/address_book/page/page.dart';
|
||||
import 'package:pweb/pages/dashboard/dashboard.dart';
|
||||
import 'package:pweb/pages/payout_page/page.dart';
|
||||
import 'package:pweb/pages/payout_page/wallet/edit/page.dart';
|
||||
import 'package:pweb/pages/payment_methods/page.dart';
|
||||
import 'package:pweb/pages/report/page.dart';
|
||||
import 'package:pweb/pages/settings/profile/page.dart';
|
||||
import 'package:pweb/providers/page_selector.dart';
|
||||
import 'package:pweb/widgets/sidebar/destinations.dart';
|
||||
import 'package:pweb/widgets/sidebar/page.dart';
|
||||
|
||||
import 'package:pweb/generated/i18n/app_localizations.dart';
|
||||
|
||||
|
||||
RouteBase payoutShellRoute() => ShellRoute(
|
||||
pageBuilder: (context, state, child) => NoTransitionPage(
|
||||
child: PageSelector(
|
||||
selected: payoutDestinationFromLocation(state.uri.toString()),
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
routes: [
|
||||
GoRoute(
|
||||
name: Pages.dashboard.name,
|
||||
path: routerPage(Pages.dashboard),
|
||||
pageBuilder: (context, state) {
|
||||
final selector = context.read<PageSelectorProvider>();
|
||||
return NoTransitionPage(
|
||||
child: DashboardPage(
|
||||
onRecipientSelected: (recipient) {
|
||||
selector.selectRecipient(recipient);
|
||||
context.go(payoutPath(PayoutDestination.payment));
|
||||
},
|
||||
onGoToPaymentWithoutRecipient: (type) {
|
||||
selector.startPaymentWithoutRecipient(type);
|
||||
context.go(payoutPath(PayoutDestination.payment));
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutRecipients',
|
||||
path: payoutPath(PayoutDestination.recipients),
|
||||
pageBuilder: (context, state) {
|
||||
final selector = context.read<PageSelectorProvider>();
|
||||
return NoTransitionPage(
|
||||
child: RecipientAddressBookPage(
|
||||
onRecipientSelected: (recipient) {
|
||||
selector.selectRecipient(recipient, fromList: true);
|
||||
context.go(payoutPath(PayoutDestination.payment));
|
||||
},
|
||||
onAddRecipient: () {
|
||||
selector.goToAddRecipient();
|
||||
context.go(payoutPath(PayoutDestination.addrecipient));
|
||||
},
|
||||
onEditRecipient: (recipient) {
|
||||
selector.editRecipient(recipient, fromList: true);
|
||||
context.go(payoutPath(PayoutDestination.addrecipient));
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutAddRecipient',
|
||||
path: payoutPath(PayoutDestination.addrecipient),
|
||||
pageBuilder: (context, state) {
|
||||
final selector = context.read<PageSelectorProvider>();
|
||||
final recipient = selector.recipientProvider?.selectedRecipient;
|
||||
return NoTransitionPage(
|
||||
child: AdressBookRecipientForm(
|
||||
recipient: recipient,
|
||||
onSaved: (_) {
|
||||
selector.selectPage(PayoutDestination.recipients);
|
||||
context.go(payoutPath(PayoutDestination.recipients));
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutPayment',
|
||||
path: payoutPath(PayoutDestination.payment),
|
||||
pageBuilder: (context, state) {
|
||||
final selector = context.read<PageSelectorProvider>();
|
||||
return NoTransitionPage(
|
||||
child: PaymentPage(
|
||||
onBack: (_) {
|
||||
final destination = selector.goBackFromPayment();
|
||||
context.go(payoutPath(destination));
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutSettings',
|
||||
path: payoutPath(PayoutDestination.settings),
|
||||
pageBuilder: (context, state) => NoTransitionPage(
|
||||
child: const ProfileSettingsPage(),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutReports',
|
||||
path: payoutPath(PayoutDestination.reports),
|
||||
pageBuilder: (context, state) => NoTransitionPage(
|
||||
child: const OperationHistoryPage(),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutMethods',
|
||||
path: payoutPath(PayoutDestination.methods),
|
||||
pageBuilder: (context, state) {
|
||||
final selector = context.read<PageSelectorProvider>();
|
||||
return NoTransitionPage(
|
||||
child: PaymentConfigPage(
|
||||
onWalletTap: (wallet) {
|
||||
selector.selectWallet(wallet);
|
||||
context.go(payoutPath(PayoutDestination.editwallet));
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
name: 'payoutEditWallet',
|
||||
path: payoutPath(PayoutDestination.editwallet),
|
||||
pageBuilder: (context, state) {
|
||||
final selector = context.read<PageSelectorProvider>();
|
||||
final wallet = selector.walletsProvider?.selectedWallet;
|
||||
if (wallet == null) {
|
||||
final loc = AppLocalizations.of(context)!;
|
||||
return NoTransitionPage(
|
||||
child: Center(child: Text(loc.noWalletSelected)),
|
||||
);
|
||||
}
|
||||
|
||||
return NoTransitionPage(
|
||||
child: WalletEditPage(
|
||||
onBack: () {
|
||||
selector.goBackFromWalletEdit();
|
||||
context.go(payoutPath(PayoutDestination.methods));
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
Reference in New Issue
Block a user