Skip to content

Handle wallet disconnect during unlock - #566

Merged
barry01-hash merged 1 commit into
PromptMintLabs:mainfrom
Hibhee01:fix-wallet-disconnect-unlock
Sep 3, 2026
Merged

Handle wallet disconnect during unlock#566
barry01-hash merged 1 commit into
PromptMintLabs:mainfrom
Hibhee01:fix-wallet-disconnect-unlock

Conversation

@Hibhee01

Copy link
Copy Markdown
Contributor

Overview

Handles wallet disconnects during prompt unlocks by stopping the unlock flow before the unlock API is called and surfacing a contextual reconnect prompt to the buyer.

Related Issue

Closes #428

Changes

  • Added a wallet connection guard to the prompt unlock helper so disconnects after challenge creation or message signing are detected before decrypting.
  • Updated the prompt modal to show a prompt-specific reconnect message and reconnect action when the wallet drops mid-unlock.
  • Tracked wallet disconnect unlock failures with a dedicated wallet_disconnected reason code.
  • Added regression coverage for the guarded unlock helper and reconnect prompt.

Verification Results

  • git diff --check - passed.
  • corepack.cmd yarn install --immutable - failed before tests because Yarn reports the checked-in lockfile would be modified.
  • corepack.cmd yarn vitest run src/lib/prompts/unlock.test.ts src/test/wallet/PurchaseButton.test.tsx - could not run because Yarn has no node_modules state file without a successful install.

Acceptance Criteria

Criteria Status
Detect wallet disconnect during unlock Complete
Prompt buyer to reconnect with prompt context Complete
Avoid silent generic unlock failure Complete
Add focused regression coverage Complete

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Hibhee01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@barry01-hash
barry01-hash merged commit 5814272 into PromptMintLabs:main Sep 3, 2026
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.

Handle wallet disconnect during unlock gracefully

2 participants