Add wallet overwrite warning before QR code generation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- csharp, javascript
Research direction
Start in Controllers/SetupController.cs at the ImportWallets GET handler and follow the existing wallet status access through ExplorerClientProvider and StoreRepository. Add the flags in Models/ImportViewModels.cs and update Views/Setup/ImportWallets.cshtml so Generate QR Code warns only for selected wallet types with active configurations. Done means the warning lists each wallet type that will be overwritten and requires confirmation before generation.
Written by the indexing model from the issue text.
Description
Problem
The ImportWallets setup form lets users select wallet types (Bitcoin, Lightning, Liquid) and click "Generate QR Code" without any warning that existing wallet configurations will be replaced. If a user has an on-chain hot wallet with a balance in BTCPay, scanning the resulting QR code from their mobile wallet will overwrite that configuration and the funds become inaccessible.
Current UI
The setup form shows toggles for Bitcoin, Lightning, and Liquid Bitcoin with a "Generate QR Code" button, but no indication that existing wallets will be replaced.
Suggested Fix
-
Backend (
Controllers/SetupController.cs): In theImportWalletsGET handler, query the store's existing wallet status for each type (BTC, BTC-LN, LBTC) viaExplorerClientProvider/StoreRepository. Pass flags likeHasExistingBtcWallet,HasExistingLnWallet,HasExistingLbtcWalletto the view model. -
View Model (
Models/ImportViewModels.cs): AddHasExisting*boolean properties toImportWalletsViewModel. -
Frontend (
Views/Setup/ImportWallets.cshtml): When the user clicks "Generate QR Code", intercept with a JavaScript confirmation modal if any selected wallet type already has an active configuration. Example message:WARNING: Your store already has a [Bitcoin/Lightning/Liquid] wallet configured. Generating this QR code and scanning it will REPLACE your current wallet. If you have funds in your existing wallet, transfer them out first. Continue?
-
The modal should list specifically which wallet types will be overwritten based on the checkboxes selected and existing configs.
- Dominant language
- C#
- Stars
- 13
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100