Page MenuHomePhabricator

[Cashtab] Manually adding contacts
ClosedPublic

Authored by emack on Apr 13 2022, 11:00.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCa571cf8c20ac: [Cashtab] Manually adding contacts
Summary

Supersedes D11326

Option to manually add a new contact to contact list.

Test Plan
  • open cashtab in incognito mode, create new wallet, navigate to Settings and ensure the Contact List dropdown shows an empty list with instructions to either click the New Contact button or to go via the tx history screen's 'Add to contacts' icon.
  • click New Contact and ensure if either of the Name or Address inputs are invalid then the OK button will not progress further until this is corrected
  • enter valid input for both name and address and ensure the OK button results in the successful adding of the contact to the list
  • enter a differet name but the same address as the first contact and ensure the OK button results in a message indicating duplication, with no change to the contact list
  • ensure bitcoincash, simpleledger and etoken addresses are flagged as invalid address inputs
  • send an incoming tx to this wallet, then ensure no regression to the Add to contacts icon routing to the Contact List, with the address added if it didn't already exist

Diff Detail

Repository
rABC Bitcoin ABC
Branch
manualContact2
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18809
Build 37409: Build Diffcashtab-tests
Build 37408: arc lint + arc unit

Event Timeline

emack requested review of this revision.Apr 13 2022, 11:00
bytesofman added inline comments.
web/cashtab/src/components/Configure/Configure.js
1246

Need a to param here:

image.png (323×723 px, 92 KB)

Probably best to not use the <Link> component, instead style a <button>

This revision now requires changes to proceed.Apr 14 2022, 09:34

Using styled button instead of Link

bytesofman added inline comments.
web/cashtab/src/components/Configure/Configure.js
329 ↗(On Diff #33224)

Use a styled component here instead of the generic.

1373 ↗(On Diff #33224)

Make this a styled component

This revision now requires changes to proceed.Apr 20 2022, 17:13
emack marked 2 inline comments as done.

Updates to contact list button as a styled component

image.png (97×661 px, 15 KB)

  • If it already exists, user should get an error notification
  • The 'x' is appearing on top of the msg both here and in the success notifications
This revision now requires changes to proceed.Apr 21 2022, 20:04
  • changed to error notifications for contact duplicates added from Tx History and manual add workflows. The error notification layout itself mitigates the 'x' appearing on top of the duplication message
  • adjusted generalNotification usage to mitigate the overlapping 'x' on success messages

Adjusted Manual Add button position and fixed post-merge conditional rendering bug

This revision is now accepted and ready to land.Apr 22 2022, 03:36
This revision was automatically updated to reflect the committed changes.