Skip to content

fix: resolve TotalInvested showing zero and fix 12 UI/UX issues#787

Merged
dangershony merged 1 commit intomainfrom
fix/ui-bugs-batch-investment-amount
Apr 27, 2026
Merged

fix: resolve TotalInvested showing zero and fix 12 UI/UX issues#787
dangershony merged 1 commit intomainfrom
fix/ui-bugs-batch-investment-amount

Conversation

@dangershony
Copy link
Copy Markdown
Member

Summary

  • Fix TotalInvested showing 0.00000000 for both invest-type and fund-type projects in the portfolio stats card. The indexer's TotalAmount can be 0 due to lag; now falls back to InvestmentRecord.InvestedAmountSats (stored locally at publish time) and the handshake transaction hex path.
  • Add TotalInvestors to InvestedProjectDto, populated from indexer stats (InvestorCount), mapped through to the portfolio detail view.
  • Standardize date format to dd MMM yyyy (e.g. "15 Jan 2026") across all user-facing dates (Shell, Funders, Portfolio).
  • Settings refresh buttons: add spinner animation and disable-while-working for indexer/relay refresh.
  • Settings debug mode: fix spacing between description text and toggle switch.
  • ManageProject initial load: wrap async loads in InitialLoadAsync() with IsRefreshing spinner.
  • InvestmentDetailView: add persistent refresh button with spinner in the nav bar.
  • Edit Project button: wire click handler through event chain to open edit profile.
  • Deploy success "Complete Profile": route through callback chain to open edit profile for the newly deployed project.
  • View Private Keys: skip redundant password modal (default password used internally).
  • DocumentProjectService null guard: prevent NRE in LatestFromNostrAsync when project data is null.
  • Integration tests: add TotalInvested > 0 assertions in both InvestAndRecoverTest (invest-type) and FundAndRecoverTest (fund-type) to validate the fix.

Test Results

  • SDK unit tests: 312 passed, 0 failed
  • Shared tests: 142 passed, 0 failed
  • InvestAndRecoverTest: passed (TotalInvested=0.01980000)
  • FundAndRecoverTest: passed (TotalInvested=0.01980000)

- Fix TotalInvested showing 0 for both invest and fund project types by
  using InvestmentRecord.InvestedAmountSats as fallback when the indexer
  returns TotalAmount == 0, and falling through to the handshake path
  to compute amount from transaction hex when needed
- Add TotalInvestors to InvestedProjectDto, populated from indexer stats
- Add null guard in DocumentProjectService.LatestFromNostrAsync
- Standardize date format to 'dd MMM yyyy' across all user-facing dates
- Add spinner/disable feedback to Settings refresh buttons
- Add debug mode toggle spacing fix
- Wire Edit Project button in ManageProjectContentView
- Wire Deploy success 'Complete Profile' to open edit profile
- Add ManageProject initial load spinner (IsRefreshing)
- Add persistent refresh button in InvestmentDetailView nav bar
- Skip redundant password modal for View Private Keys
- Add TotalInvested > 0 assertions in both InvestAndRecoverTest and
  FundAndRecoverTest integration tests
@dangershony dangershony merged commit 6d6e9ea into main Apr 27, 2026
3 checks passed
@dangershony dangershony deleted the fix/ui-bugs-batch-investment-amount branch April 27, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant