Skip to content

feat: support monero_wallet URI restoration - #1261

Open
sneurlax wants to merge 39 commits into
stagingfrom
feat/monero-uri
Open

sneurlax wants to merge 39 commits into
stagingfrom
feat/monero-uri

Conversation

@sneurlax

Copy link
Copy Markdown
Member

supports seed, view_key only, and spend_key and view_key.

previously if it had a newline at the beginning it would choke
monero_wallet worked. now monero-wallet works, too

there's a frustrating variety of xmr wallet uri schemes: some with underscores, some with dashes
sneurlax added a commit to sneurlax/stack_wallet that referenced this pull request Mar 2, 2026
@sneurlax
sneurlax marked this pull request as draft March 6, 2026 20:01
@sneurlax

sneurlax commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

Conflicts in minor and resolvable ways with #1278 ... converting to a draft for now but this can be merged first

@intangir

Copy link
Copy Markdown

will this allow you to import a monero account from the keys?
also can it allow 12 word seed phrases (following BIP39/HD standards) ? those two features are the main things i'm still hoping stack wallet supports as far as monero

@sneurlax

Copy link
Copy Markdown
Member Author

will this allow you to import a monero account from the keys? also can it allow 12 word seed phrases (following BIP39/HD standards) ? those two features are the main things i'm still hoping stack wallet supports as far as monero

Yes and no: yes it will allow importing via keys (in the form of a URI, anyways), but no it does not allow 12 word BIP39 seeds to be imported, which is separate functionality.

@sneurlax
sneurlax marked this pull request as ready for review May 14, 2026 19:20
@codecov

codecov Bot commented May 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.38232% with 619 lines in your changes missing coverage. Please review.
✅ Project coverage is 6.03%. Comparing base (da38ddc) to head (956260c).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
...iew/restore_options_view/restore_options_view.dart 38.51% 182 Missing ⚠️
...t_settings/delete_wallet_recovery_phrase_view.dart 23.60% 123 Missing ⚠️
...et_view/sub_widgets/wallet_keys_desktop_popup.dart 0.00% 80 Missing ⚠️
lib/services/wallet_recovery_service.dart 0.00% 51 Missing ⚠️
...wallets/wallet/intermediate/lib_monero_wallet.dart 0.00% 39 Missing ⚠️
...s_view/wallet_backup_views/wallet_backup_view.dart 45.61% 31 Missing ⚠️
...tore_wallet_view/sub_widgets/restoring_dialog.dart 6.45% 29 Missing ⚠️
...ck_backup_views/helpers/restore_create_backup.dart 0.00% 13 Missing ⚠️
...let_view/sub_widgets/delete_wallet_keys_popup.dart 80.88% 13 Missing ⚠️
...gs_wallet_settings/delete_wallet_warning_view.dart 0.00% 9 Missing ⚠️
... and 15 more
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1261      +/-   ##
===========================================
+ Coverage     4.79%    6.03%   +1.23%     
===========================================
  Files         1109     1113       +4     
  Lines       111003   111487     +484     
===========================================
+ Hits          5325     6727    +1402     
+ Misses      105678   104760     -918     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Serializes open, node updates, native replacement and shutdown on a single
mutex, and rejects queued work once shutdown has begun. The Tor transition
gate parks a node update while Tor is bootstrapping and abandons it as soon
as the operation is superseded.
Every LibMonero/Wownero/Salvium instance subscribed to the Tor status and
preference events from its constructor, so toggling Tor ran updateNode() on
the dozens of wallets Wallets.load() constructs but never opens. With a
Tor-only or clearnet-only node the TOR/clearnet mismatch escaped the async
listener as an unhandled exception.

Listeners are now attached in open() and detached on exit() or a failed open,
and the native lifecycle runs through CryptonoteWalletLifecycle so concurrent
open/exit calls cannot load or tear down the native wallet twice. Because an
exited wallet no longer follows node or Tor changes, open() re-runs the node
update whenever the native daemon session was torn down; otherwise a reopened
wallet resumes syncing over its stale clearnet session. Also corrects the
inverted null guard in recoverViewOnly().
sneurlax and others added 19 commits October 7, 2026 13:04
Co-Authored-By: detherminal <76167420+detherminal@users.noreply.github.com>
these shouldn't exist/happen, but do/can
previously if it had a newline at the beginning it would choke
monero_wallet worked. now monero-wallet works, too

there's a frustrating variety of xmr wallet uri schemes: some with underscores, some with dashes
…20261110/pr-1261

# Conflicts:
#	lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/wallet_keys_desktop_popup.dart
#	lib/services/wallets.dart
#	lib/utilities/address_utils.dart
#	test/address_utils_test.dart
…20261110/pr-1261

# Conflicts:
#	lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_backup_views/wallet_backup_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_recovery_phrase_view.dart
#	lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart
#	lib/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/delete_wallet_keys_popup.dart
#	lib/utilities/address_utils.dart
#	lib/wallets/wallet/impl/monero_wallet.dart
#	lib/wallets/wallet/intermediate/lib_monero_wallet.dart
#	lib/wl_gen/interfaces/cs_monero_interface.dart
#	test/address_utils_test.dart
@sneurlax

Copy link
Copy Markdown
Member Author

Merged staging at d29d84c660492fd6dcc7ee67dbce4a76e85c026a and incorporated the divergent cypherstack branch's Monero network selection and lifecycle fixes. Payment-URI multi-recipient parsing is preserved alongside wallet-URI parsing; key recovery material remains available to backup and deletion. Restore failures now avoid logging or displaying exception text that could include recovery secrets.

Validation: 74 URI, recovery-material, backup and secure-storage tests passed. Targeted analysis reported no errors and one test inference warning, plus informational lints. A real Monero node and native key restore were not exercised.

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.

2 participants