Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

fix: set empty names as shortened address #3794

Merged
merged 8 commits into from
Apr 20, 2022
Merged

Conversation

iamacook
Copy link
Member

What it solves

Resolves #3526

How this PR fixes it

If an empty name makes it's way to the address book reducer (be it by adding or importing), it is set to a shortened version of the given address.

A temporary dispatch sets any existing empty-named address book entries to be the same as the above.

How to test it

Remove the name name of a contact in the locally stored address book. Refresh/navigate to the address book and observe the shortened address be in place of the name.

Screenshots

image

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

Comment on lines +32 to +34
useEffect(() => {
dispatch(addressBookFixEmptyNames())
}, [dispatch])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary and should be removed at some point.

@github-actions
Copy link

github-actions bot commented Apr 19, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea using short addresses! I would go for 4 symbols, not 8, though.

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@coveralls
Copy link

coveralls commented Apr 19, 2022

Pull Request Test Coverage Report for Build 2194408563

  • 6 of 11 (54.55%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 35.601%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/logic/addressBook/hooks/useAddressBookSync.ts 0 2 0.0%
src/logic/addressBook/store/reducer/index.ts 5 8 62.5%
Totals Coverage Status
Change from base Build 2159885788: 0.02%
Covered Lines: 3553
Relevant Lines: 9027

💛 - Coveralls

@iamacook iamacook requested a review from katspaugh April 20, 2022 07:25
Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@francovenica
Copy link
Contributor

francovenica commented Apr 20, 2022

Looks good to me.
The name is fine, it shows also the same in the owners' list. The name still works like any other name, it can be edited just fine, is used if another safe is created with that user as owner...
image

@iamacook iamacook merged commit 5b23152 into dev Apr 20, 2022
@iamacook iamacook deleted the empty-address-book-names branch April 20, 2022 09:29
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty names in the Address book
4 participants