-
Notifications
You must be signed in to change notification settings - Fork 363
fix: filter invalid addresses in imports #3810
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
@@ -7,12 +7,12 @@ describe('Test AddressBook BatchLoadEntries Reducer', () => { | |||
it('returns an addressbook array', () => { | |||
const addressBookEntries = [ | |||
{ | |||
address: '0x4462527986c3fD47f498eF25B4D01e6AAD7aBcb2', | |||
address: '0x5fb582FD320ab1CBf055F65ED74D01b9DdB90A00', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All addresses were updated in this test file as they were invalid addresses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should only checksummed addresses be imported? If so, should we checksum them before saving an entry so that when they are exported, they can be imported again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Pull Request Test Coverage Report for Build 2219985031
💛 - Coveralls |
Oh. 🤬 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks for adding tests! 👍
Looks good. I used the csv that Lili provided. It has 2 addresses, one valid and one invalid (2 characters were changed at the end). Uploading that file only imports the valid address. QA approved |
What it solves
Resolves #3690
How this PR fixes it
bathLoadEntries
used when loading a Safe or importing and address book now filters invalid addresses from address books. The error was being thrown from the blockie generator plugin.How to test it
Import the corrupt csv from the issue and observe that only one entry exists in the Safe address book.