symbol / mobile-wallet

Symbol Mobile Wallet
Apache License 2.0
8 stars 14 forks source link

[wallet/mobile] feat: add whitelist/blacklist to address book #323

Closed OlegMakarenko closed 1 year ago

OlegMakarenko commented 2 years ago

Problem

Tests

Increased coverage from 1.5% to 19.5%

image

cryptoBeliever commented 2 years ago

@OlegMakarenko what could be improved:

  1. When we add a new contact (Open address book -> "Add Contact") always whitelist is selected by default in the selector. Also when we clicked "Add Contact" from "Black List" tab. I think it may be unexpected for users and maybe better in such a situation to select "Black List" on the list automatically. Or add two options "Add" and "Block" like on the desktop wallet.

  2. Steps:

    • Go to history view and copy the transaction signer from one of the transactions.
    • Go to the address book and black list this address
    • Go back to the History view Result: Transaction with blocked signer has the red text "Blocked" which is fine. But it will be hidden only after we refresh the view.
  3. For blocked contacts we have no option to add a name. I think it should be possible and optional as is on the desktop wallet.

OlegMakarenko commented 2 years ago

Thanks @cryptoBeliever!

  1. Added field preselection depending on selected tab (White List or Black List).
  2. Added refresh of the transaction list after the address book update.
  3. Returned back name field for blacklisted contacts. Made this field optional. Updated TransactionItem and TransactionGraphic components to fit blocked contact name in the row.