Skip to content

Desktop: fill the address book chooser without visiting the Address Book page first - #1491

Merged
julian-CStack merged 6 commits into
stagingfrom
fix/desktop-address-book-chooser
Nov 3, 2026
Merged

julian-CStack merged 6 commits into
stagingfrom
fix/desktop-address-book-chooser

Conversation

@sneurlax

@sneurlax sneurlax commented Nov 1, 2026

Copy link
Copy Markdown
Member

Tester report: on desktop, choosing a recipient from the address book while setting up a send shows no addresses.

Cause

The "My Stack" contact, which holds the user's own wallet addresses, was only created or refreshed when the Address Book page (desktop_address_book.dart) was opened. The chooser dialog on the send screens reads the same contacts but never built it, so on a fresh install, or after adding a wallet, it showed nothing for the user's own wallets until the Address Book page had been visited once.

Change

  • New AddressBookService.updateMyStackContact(Iterable<Wallet>): the logic moved out of desktop_address_book.dart, with a per-wallet try/catch so one failing wallet doesn't leave the contact empty.
  • address_book_address_chooser.dart is now a ConsumerStatefulWidget and calls it after the first frame.
  • desktop_address_book.dart calls the service method instead of its own copy.
  • The mobile address_book_view.dart copy is unchanged.

Tested

  • Full flutter test: 687 passed, 8 skipped, 0 failed.
  • Linux desktop app: on a fresh profile the chooser on the main Send screen and on an ETH token send lists "My Stack" and the coin's contacts, selecting one fills the address field, and search filters as expected.
  • Not tested: Windows or macOS builds, the exchange step 2 chooser.

sneurlax and others added 5 commits October 30, 2026 17:32
Skipping the whole My Stack update when one wallet failed meant a wallet
that always fails (for example one whose native library won't load) kept
the contact from ever being created or updated, which is the empty
chooser this branch fixes. Fall back to that wallet's cached receiving
address instead, and leave out wallets with no address at all.
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.98592% with 49 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.63%. Comparing base (a22cfcb) to head (eefcf5d).
⚠️ Report is 1 commits behind head on staging.

Files with missing lines Patch % Lines
..._address_chooser/address_book_address_chooser.dart 0.00% 33 Missing ⚠️
...ecific/address_book_view/desktop_address_book.dart 0.00% 15 Missing ⚠️
lib/services/address_book_service.dart 95.65% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1491      +/-   ##
===========================================
+ Coverage    11.62%   11.63%   +0.01%     
===========================================
  Files         1134     1134              
  Lines       114193   114210      +17     
===========================================
+ Hits         13272    13294      +22     
+ Misses      100921   100916       -5     

☔ 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.

A Firo wallet's cached receiving address is its transparent one, so falling
back to it put a public address in My Stack where a Spark address belonged.
@julian-CStack
julian-CStack merged commit 41e8fab into staging Nov 3, 2026
4 checks passed
@julian-CStack
julian-CStack deleted the fix/desktop-address-book-chooser branch November 3, 2026 19:13
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