Skip to content

Block imported Monero wallets from using the Edge LWS backend#6053

Open
peachbits wants to merge 1 commit into
developfrom
matthew/monero-imported-wallet-backend
Open

Block imported Monero wallets from using the Edge LWS backend#6053
peachbits wants to merge 1 commit into
developfrom
matthew/monero-imported-wallet-backend

Conversation

@peachbits

@peachbits peachbits commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Description

Asana: https://app.asana.com/0/1213880789473005/1215859683644063

Imported Monero wallets were silently created on the Edge LWS backend even though imported wallets are not permitted to use Edge's own LWS server (each watched wallet has an ongoing server-side scanning cost). The edit-name scene seeded the backend wallet setting from its first option (lws), which then flowed through to wallet creation.

This centralizes the rule as SpecialCurrencyInfo.checkImportedWalletSettings(settings, userSettings) so the import flow and the Wallet Settings modal stay in sync:

  • Tapping Import Wallets on the edit-name scene now validates the chosen backend. When an override is required, a modal explains that imported wallets can use a full node or a custom LWS server, offers a link to the asset's currency settings to configure a custom server, and asks whether to continue using a full node (Continue / Back). Only Continue applies the full-node override and proceeds to the import scene.
  • The Wallet Settings modal rejects the same combination via the shared helper (replacing an inline duplicate of the rule).
  • A custom (non-Edge) LWS server is still allowed.

Added unit tests (src/__tests__/moneroImportSettings.test.ts) covering every branch of the rule; existing snapshot/scene tests pass.

Device-testing note: the affected logic is covered by unit + snapshot tests. Live on-device verification of this iteration was blocked by an unrelated environment issue (the app would not get past the splash screen against Edge's servers); an earlier, behavior-equivalent version of the override was verified on the iOS simulator (imported wallet → Full Node).


Note

Medium Risk
Changes wallet import and settings behavior for Monero backends; logic is covered by new unit tests but affects a user-facing wallet-creation path.

Overview
Imported Monero wallets could still be created on Edge’s LWS because the edit-name flow defaulted the backend to lws. This PR centralizes the rule in SpecialCurrencyInfo.checkImportedWalletSettings (with isMoneroEdgeLws in src/util/monero.ts) so import and wallet settings stay aligned.

On Import Wallets, if Edge LWS would be used, a modal explains full node vs custom LWS, links to currency settings, and only Continue applies a monerod override before the import scene. The Wallet Settings modal uses the same helper to reject invalid backend picks instead of duplicated Monero logic. Custom non-Edge LWS remains allowed.

Adds unit tests for isMoneroEdgeLws and Monero’s checkImportedWalletSettings, plus new copy and a CHANGELOG entry.

Reviewed by Cursor Bugbot for commit 2d07ca9. Bugbot is set up for automated code reviews on this repo. Configure here.

Imported Monero wallets were created on the Edge LWS backend despite the
business rule that imported wallets must use a full node (or a user-configured
custom LWS) -- each watched wallet has an ongoing server-side scanning cost.
The GUI seeded the backend wallet setting from the first option ('lws') on the
edit-name scene, which then rode through to wallet creation.

Centralize the rule as SpecialCurrencyInfo.checkImportedWalletSettings so the
import flow and the Wallet Settings modal stay in sync:
- tapping "Import Wallets" on the edit-name scene validates the chosen backend;
  when an override is required it shows a modal offering to continue with a full
  node or to open the asset's currency settings to configure a custom LWS server
- the Wallet Settings modal rejects the same combination via the shared helper
- a custom (non-Edge) LWS server is still allowed

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant