Add Payment and Wallet modules with home routing integration.
Introduce real payment collection and wallet screens to replace home menu placeholders, wire APIs through RootView, and support bank card OSS uploads plus QR code saving to the photo library. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -23,6 +23,8 @@ struct RootView: View {
|
||||
@State private var accountContextAPI: AccountContextAPI
|
||||
@State private var ordersAPI: OrdersAPI
|
||||
@State private var statisticsAPI: StatisticsAPI
|
||||
@State private var paymentAPI: PaymentAPI
|
||||
@State private var walletAPI: WalletAPI
|
||||
@State private var authSessionCoordinator: AuthSessionCoordinator
|
||||
@State private var sessionBootstrapper: SessionBootstrapper
|
||||
|
||||
@ -40,6 +42,8 @@ struct RootView: View {
|
||||
_accountContextAPI = State(initialValue: AccountContextAPI(client: apiClient))
|
||||
_ordersAPI = State(initialValue: OrdersAPI(client: apiClient))
|
||||
_statisticsAPI = State(initialValue: StatisticsAPI(client: apiClient))
|
||||
_paymentAPI = State(initialValue: PaymentAPI(client: apiClient))
|
||||
_walletAPI = State(initialValue: WalletAPI(client: apiClient))
|
||||
_authSessionCoordinator = State(
|
||||
initialValue: AuthSessionCoordinator(
|
||||
tokenStore: tokenStore,
|
||||
@ -72,6 +76,8 @@ struct RootView: View {
|
||||
.environment(accountContextAPI)
|
||||
.environment(ordersAPI)
|
||||
.environment(statisticsAPI)
|
||||
.environment(paymentAPI)
|
||||
.environment(walletAPI)
|
||||
.environment(authSessionCoordinator)
|
||||
.task {
|
||||
apiClient.bindAuthTokenProvider { appSession.token }
|
||||
|
||||
Reference in New Issue
Block a user