mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-15 17:19:27 +02:00
fix: properly clear wallet state on disconnect and update copy
Changes: - Clear all wallet state when disconnecting (transactions, walletInfo, loading flags) - Previously only cleared state on connect, leaving stale data visible - Remove "Mutiny" mention from connection dialog copy - Update to generic "NWC wallet provider" text Now when you disconnect the wallet with the window open, it properly clears all data and returns to the "No Wallet Connected" state.
This commit is contained in:
@@ -129,8 +129,8 @@ export default function ConnectWalletDialog({
|
||||
|
||||
<div className="space-y-4">
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Enter your wallet connection string. You can get this from your
|
||||
wallet provider (Alby, Mutiny, etc.)
|
||||
Enter your wallet connection string. You can get this from your NWC
|
||||
wallet provider.
|
||||
</p>
|
||||
|
||||
{error && (
|
||||
|
||||
@@ -252,6 +252,15 @@ export default function WalletViewer() {
|
||||
setTxLoadFailed(false);
|
||||
setTransactions([]);
|
||||
setWalletInfo(null);
|
||||
} else {
|
||||
// Clear all state when wallet disconnects
|
||||
setTxLoadAttempted(false);
|
||||
setTxLoadFailed(false);
|
||||
setTransactions([]);
|
||||
setWalletInfo(null);
|
||||
setLoading(false);
|
||||
setLoadingMore(false);
|
||||
setHasMore(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user