(Bugfix) - #1246 Addressbook entries removed when reloading page#1300
(Bugfix) - #1246 Addressbook entries removed when reloading page#1300Agupane merged 36 commits intodevelopmentfrom
Conversation
Restructure addressbook store type
…to 1246-addressbook-entries-removed
…to 1246-addressbook-entries-removed
|
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
[warning] @typescript-eslint/explicit-module-boundary-types
Report generated by eslint-plus-action |
|
Travis automatic deployment: |
What happens to users who have old structure in their storage? |
That's not a problem, I updated how we are managing the state on redux, not how we are storing it on localStorage, you can do the test using this preview branch and another one if you like |
…to 1246-addressbook-entries-removed
|
The address book starts empty (normal behavior), and I started to add names to it and they were saved correctly. Chances are that this are 2 different issues, one is the address book being filled on its own and the other is not showing the name for being a name by default Steps: |
src/logic/addressBook/store/actions/saveAndUpdateAddressBook.ts
Outdated
Show resolved
Hide resolved
fernandomg
left a comment
There was a problem hiding this comment.
Aside from what Franco pointed out, another use case is that it fails to persist the already stored names across Safes. That is:
- Load an existing Safe and set some names for the owners
- Create a new Safe, with one owner (this is irrelevant, I guess, but it's what I did)
- Switch to the previously loaded Safe
- Switch back to the newly created Safe, go to address book tab (you'll see all the previously loaded Safe owners, but without a name being listed)
- Obviously, if you set a name in the newly created Safe, it will overwrite the name for the previously loaded one.
|
As fas as I investigated, most of this issues are related to a race condition between the load of the safe and the load of the address book, we are currently syncing the owners of each of the safes and there are times in which the safe is loaded before the addressBook. I think that the best solution should be the implementation of this refactor in order to have an unique source of truth and avoid this sync of owners between safes. What do you think? @lukasschor |
…to 801-address-book-refactor # Conflicts: # src/logic/addressBook/store/actions/addAddressBook.js # src/logic/addressBook/store/actions/addAddressBookEntry.js # src/logic/addressBook/store/actions/addOrUpdateAddressBookEntry.js # src/logic/addressBook/store/actions/loadAddressBookFromStorage.js # src/logic/addressBook/store/actions/removeAddressBookEntry.js # src/logic/addressBook/store/actions/updateAddressBookEntry.js # src/logic/addressBook/store/reducer/addressBook.ts # src/logic/addressBook/store/selectors/index.js # src/routes/safe/components/AddressBook/index.tsx # src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.tsx # src/routes/safe/components/Settings/ManageOwners/EditOwnerModal/index.tsx # src/routes/safe/components/Settings/ManageOwners/ReplaceOwnerModal/index.tsx # src/routes/safe/container/Hooks/useLoadSafe.jsx # src/routes/safe/container/index.jsx # src/routes/safe/store/middleware/safeStorage.js
Remove unused saveAndUpdateAddressBook action
Add types Removes unused addAddressBook action
Let the user remove owners users without adding them again each time the safe loads
|
|
Travis automatic deployment: |
…to 1246-addressbook-entries-removed
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
Travis automatic deployment: |
…' into 1246-addressbook-entries-removed
|
Travis automatic deployment: |
1 similar comment
|
Travis automatic deployment: |
|
Travis automatic deployment: |
|
The issues reported in #1246 and #558 were solved There is an inconsistency how address book is working regarding the unknown names, and addresses being added automatically sometimes. This is going to be discussion on when and how implement it. But since the 2 main issues are solved here I'll approve the PR |
|
Travis automatic deployment: |
Closes #1246
Also closes #558
Description
{addressBook:{addressBook:[]}}, now it just:{addressBook: []}