Skip to content

feat: connect 1-click fund flow to Funders section#772

Open
DavidGershony wants to merge 2 commits intomainfrom
feature/funders-1click-invest
Open

feat: connect 1-click fund flow to Funders section#772
DavidGershony wants to merge 2 commits intomainfrom
feature/funders-1click-invest

Conversation

@DavidGershony
Copy link
Copy Markdown
Collaborator

Summary

  • Connect the 1-click invest/fund flow to the Funders section (same modal pattern as InvestPageView)
  • Add "Invest" button to signature cards in FundersView for quick funding
  • Remove Liquid network tab (was a stub with no SDK wiring)
  • Fix "investment" project type not recognized in deploy validation switch
  • Override test relays with wss://test.thedude.cloud for reliable CI

Changes

  • FundersViewModel: Added Func<ProjectItemViewModel, InvestPageViewModel> factory, InvestPageViewModel? property, OpenInvestFlow()/CloseInvestFlow() methods
  • FundersView.axaml/.cs: Added Invest button, wired InvestModalsView shell modal subscription
  • InvestPageViewModel: Removed NetworkTab.Liquid enum value and all Liquid-related code
  • InvestModalsView: Removed LiquidTabBorder handling
  • CreateProjectViewModel: Fixed deploy switch to accept both "invest" and "investment"
  • TestAppBuilder: Set relay to wss://test.thedude.cloud after service construction
  • OneClickInvestFundersTest.cs: 12 new headless integration tests for Fund flow

Test plan

  • All 12 new OneClickInvestFundersTest tests pass
  • All existing tests pass (failures are pre-existing testnet infra issues)
  • Build compiles with 0 errors
  • Manual: Click "Invest" on a Funders signature card → verify modal flow works

🤖 Generated with Claude Code

…d tab

- Add InvestPageViewModel factory to FundersViewModel for opening invest flow from signature cards
- Wire InvestModalsView shell modal in FundersView (same pattern as InvestPageView)
- Add "Invest" button to Funders signature cards
- Remove Liquid network tab from NetworkTab enum and all related code
- Fix "investment" project type not recognized in CreateProjectViewModel deploy switch
- Override test relays with wss://test.thedude.cloud for reliable test execution
- Add 12 headless integration tests for the Fund flow from Funders section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
// Liquid + Import tabs are visual stubs — switching to them does not crash and surfaces a known label.
Log("[7] Stub tabs do not crash...");
vm.SelectNetworkTab(NetworkTab.Liquid);
vm.SelectedNetworkTab.Should().Be(NetworkTab.Liquid);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove test checkes?

/// - Success messages are Fund-specific
/// - FundersVM → InvestPageVM integration
/// </summary>
public class OneClickInvestFundersTest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an integration test and yet there are many tests here if a test needs to create a wallet ever time it runs this will be very very long

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this tests should be unit tests?

prop.SetValue(null, services);

// Override relays with the test relay for reliable test execution
var networkStorage = services.GetRequiredService<INetworkStorage>();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems wrong it will effect all tests no?

{
ProjectId = sig.ProjectIdentifier,
ProjectName = sig.ProjectTitle,
ProjectType = "Fund",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is odd should it default to Fund, it should depend on the project type we are working with

…View.axaml.cs conflict: keep both invest-flow subscription and refresh spinner)
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.

2 participants