safe-global / safe-ios

Safe Multisig iOS app.
GNU General Public License v3.0
114 stars 37 forks source link

Feature: add to address book when long press on an address #3416

Closed DmitryBespalov closed 3 months ago

DmitryBespalov commented 3 months ago

Integrate AddressBook 'add' and 'edit' with a long press gesture on an address.

There are several types of named addresses in the app, that is, several 'lists' where a name can come from:

API response names are displayed if there's no other name stored in the app, that is, safe's name or address book's name will take precedence over a name received from the API (such name as "SafeProxyFactory 1.3.0")

Requirements

If the address is of one of the existing objects in the app (a safe in the list of safes, an owner key, or an address book entry) then editing address name with a long press will change the name of the respective existing object in the app.

If the address is from API response and does not exist in the app then adding the name with a long press will create an address book entry.

If the address does not have a name then adding the name with a long press will create an address book entry.

If the new address book entry created or existing address book entry updated with a long press then the new or changed name is displayed where the address is displayed.

Examples

Scenario A. New name for an address When no name is assigned to address and user long presses on the address then a 'new entry' screen opens with that address pre-populated and with a name field.

When user enters a name and taps "Add" Then the screen closes and the name appears near the address.

Scenario B. Edit name of an owner address When there is an owner imported in the app And user opened a transaction details with that owner's signature And when user long presses on the address Then a 'edit entry' screen opens with the owner address pre-populated and the owner name pre-poppulated.

When user changes the name and taps "Save" Then the screen closes and the changed name is shown in the confirmation details.

When user opens the owner key details from the 'owner keys' screen in 'settings' Then the changed name is shown for that owner key.

Scenario C. Edit name of a safe Similar to the Scenario B, but the name is changed in the 'safe list' and in 'My Safe Account - Safe Account Name' screen.

Scenario D. Edit name of an address book entry Similar to the Scenario B, but the name is changed in the 'App Settings - Address Book'

liliya-soroka commented 3 months ago

Verified