mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
fix(wallet): testing the connection no longer wipes an unsaved typed URI
"Test connection" then "Save" removed the wallet. handleWalletTest re-rendered the pane (refreshWalletPaneState) in its finally, which repopulates the form from SAVED settings — empty for a URI you typed but hadn't saved — wiping the field. The next Save then saw an empty field and took the "removed" branch. Test must preserve what the user entered: refresh only the button state (applyWalletControlState), not the whole form. tests/wallet-test-preserves-input.test.mjs: a Test of an unsaved typed URI keeps it in the field. Mutation-verified (restoring refreshWalletPaneState fails it). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
c26ef89a93
commit
c829a42a45
2 files changed
+61
-1
No files matched your search
@@ -764,7 +764,11 @@ export class ProfileWalletController {
|
||||
this.mainController.showError(detail);
|
||||
} finally {
|
||||
this.setWalletPaneBusy(false);
|
||||
this.refreshWalletPaneState();
|
||||
// Do NOT refreshWalletPaneState() here: it re-renders the form from SAVED
|
||||
// settings and would wipe a URI the user typed but hasn't saved yet (then a
|
||||
// subsequent Save sees an empty field and "removes" the wallet). Testing
|
||||
// must preserve the entered value — only refresh the button state.
|
||||
this.applyWalletControlState();
|
||||
if (finalStatus) {
|
||||
this.updateWalletStatus(finalStatus, finalVariant);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user