Repository navigation
Desktop: fill the address book chooser without visiting the Address Book page first - #1491
Merged
Merged
Conversation
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 Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
AddressBookService.updateMyStackContact(Iterable<Wallet>): the logic moved out ofdesktop_address_book.dart, with a per-wallet try/catch so one failing wallet doesn't leave the contact empty.address_book_address_chooser.dartis now aConsumerStatefulWidgetand calls it after the first frame.desktop_address_book.dartcalls the service method instead of its own copy.address_book_view.dartcopy is unchanged.Tested
flutter test: 687 passed, 8 skipped, 0 failed.