Skip to content

Fix wallet encryption key mismatch, surface real errors, and restore scan button#781

Merged
dangershony merged 2 commits intomainfrom
fix/wallet-encryption-key-and-error-messages
Apr 23, 2026
Merged

Fix wallet encryption key mismatch, surface real errors, and restore scan button#781
dangershony merged 2 commits intomainfrom
fix/wallet-encryption-key-and-error-messages

Conversation

@dangershony
Copy link
Copy Markdown
Member

Summary

  • Fix critical bug: CreateWalletWithoutPassword encrypted with "DEFAULT" but SimplePasswordProvider decrypts with "default-key", causing "Invalid encryption key" on all SDK operations (deploy, sign, claim) for wallets auto-created by the invest flow
  • Fix crash: CreateProjectProfile and CreateProjectInfo handlers accessed wallet.Value without checking IsFailure, turning a graceful error into a ResultFailureException
  • Surface real errors: Claim/release toasts in ManageProject now show the actual SDK error instead of generic "Please try again" messages
  • Auto-scale toast duration: Toast display time now scales with message length (3-10s) so longer error messages are readable
  • Restore scan button: Desktop "Scan for Projects" button was removed during mobile responsive port (PR Port responsive mobile/tablet layout to design/App #771) -- re-added to the My Projects header
  • Regression tests: Added encryption key roundtrip assertions to CreateProjectTest, OneClickInvestOnChainFundedTest, and OneClickInvestLightningFundedTest

Files Changed

File Change
WalletAppService.cs "DEFAULT" to "default-key"
CreateProjectProfile.cs Add wallet.IsFailure check
CreateProjectInfo.cs Add wallet.IsFailure check
ManageProjectViewModel.cs Interpolate real error into toasts
ShellViewModel.cs Auto-scale toast duration by message length
MyProjectsView.axaml Restore desktop scan button
CreateProjectTest.cs Add key roundtrip assertion
OneClickInvestOnChainFundedTest.cs Add key roundtrip assertion
OneClickInvestLightningFundedTest.cs Add key roundtrip assertion

…d restore scan button

- Fix CreateWalletWithoutPassword using 'DEFAULT' key instead of 'default-key',
  causing 'Invalid encryption key' on all SDK operations for invest-flow wallets
- Add Result.IsFailure checks in CreateProjectProfile and CreateProjectInfo
  handlers to prevent ResultFailureException crashes
- Surface actual error messages in ManageProject claim/release toasts instead
  of generic 'Please try again' messages
- Auto-scale toast duration based on message length (3-10s) so error messages
  are readable
- Restore desktop Scan for Projects button removed in mobile responsive port
- Add encryption key roundtrip regression tests in CreateProjectTest,
  OneClickInvestOnChainFundedTest, and OneClickInvestLightningFundedTest
…lure guard was added to CreateProjectProfile
@dangershony dangershony merged commit 08430c4 into main Apr 23, 2026
1 check passed
@dangershony dangershony deleted the fix/wallet-encryption-key-and-error-messages branch April 23, 2026 19:22
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