Fix wallet page to use WalletManager trait via ServiceProvider #14
Labels
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/projectmycelium_marketplace#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The wallet page shows balance 0, no transactions, no owned products, and staking at 0. The wallet controller at
src/controllers/wallet.rs(953 lines) usesFixtureWalletManagerwhich reads from JSON fixture files instead of hero_osis KVS.Current Implementation
The
dashboard_wallet_pagehandler does useservices.wallet.get_balance()but the template-rendering path also directly reads fixture data for:What Works
The hero
WalletManagerimplementation already exists atsrc/services/impl_hero/wallet_manager.rs(302 lines) with:What Needs Fixing
dashboard_wallet_pagefully usesservices.wallet.*for all dataservices.wallet.get_transactions()services.orders.*(completed orders = owned)services.wallet.get_staking_info()or hero_ledgerAcceptance Criteria
Dependencies
Wallet page already uses services.wallet.get_balance() and get_transactions(). Core operations fully wired.
Reopened — remaining work
Remaining bypasses in wallet.rs:
UserPersistence::load_user_dataCurrencyService::new()(utility, keep)InstantPurchaseService::builder()(refactor to use WalletManager)NavbarService::builder()(UI helper, refactor to use existing traits)AutoTopUpService::builder()(needs WalletManager trait methods)Depends on #26 for WalletManager auto-topup methods.
archived repo, closing