cf. Trello activity and problem statement
Currently, each safe has its own AB. We want to make it global for all safes for a given user.
The address book should be a list of records like this:
type AddressBookEntry = {
address: string: // the contact address
name: string; // human-readable name
chainId: number; // see https://chainid.network
}
Simplify the logic that saves/restores the AB from the localStorage. Consider using a Redux plugin for that.
I think abi could be left out. There is this linked ticket (#948), yes, but currently we have no plans to have this.
@liliya-soroka @francovenica as discussed, we can start testing this issue on the epic branch #2280.
Tests cases to pay attention to:
Works fine:
Issues:
Safe load by URL Issue: The name of the safe is not being stored in the AB, or is being removed when the safe is removed. See the gif

Step:
Load the safe normally using the address
Give a name to the safe
Check the address book, the safe is there with its name
Remove the safe from the settings, you will be sent back to the "Welcome page"
Paste the URL of the safe
The address book won't show the safe anymore there
I'd assume that, even if you load the safe by URL, if the name was already entered in the AB, it should remain there if it is loaded by copy/pasting the URL.
So:
EDIT: I just checked the local storage and yes, the safe entry in the AB is being removed if it is removed from the settings. Why?, there is no need to remove it there.
Update:
So, if you have a safe in address book and you load it by copy pasting the URL the new safe takes the name of the one in the address book, so this is working fine.
The issue reported in the previous comment is more of the name being removed when the safe is removed, something that probably should not happen, but is for another ticket.
I'll close this one as approved and put the issue in a new ticket (Reported here https://github.com/gnosis/safe-react/issues/2353)
Most helpful comment
I think
abicould be left out. There is this linked ticket (#948), yes, but currently we have no plans to have this.