-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Description
After a user restores their account, dispute chat between user and admin stops working. The admin does not receive messages from the user, and the user does not receive messages from the admin.
Steps to reproduce
- Have an active dispute with ongoing admin chat
- Clear app data or reinstall
- Restore account from seed/backup
- Open the dispute
- Try to send a message to the admin → admin does not receive it
- Admin sends a message → user does not receive it
Expected behavior
After account restoration, dispute chat should resume working. The user should be able to send and receive messages with the admin.
Root cause (hypothesis)
The restore process likely does not re-establish the necessary session keys or shared secrets required for dispute chat encryption (gift wrap / NIP-59). The getAdminSharedKey() may depend on session state that is not reconstructed during restore.
Possible factors:
- Trade keys not fully restored
- Admin shared key derivation requires session data not available post-restore
- Subscription to dispute chat relay events not re-established
Possible solution
- Ensure the restore manager reconstructs all keys needed for dispute chat
- Re-subscribe to dispute chat events after restore
- Verify
getAdminSharedKey()works with restored key material
Context
Reported by @BraCR10 during testing of PR #501. This is a pre-existing issue not introduced by that PR — the restore manager's handling of dispute chat state predates the refactor.
Labels
- bug
- area: disputes
- area: restore