Validate Ethereum addresses in input fields #144
Reference in New Issue
Block a user
Delete Branch "feature/validate_eth_addresses"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds address validation to the address inputs.
Importing the function from
web3-utils, becauseethers.jsdoesn't have any such utility function. 🙁ethers has that getchcksumaddress function that does some check: https://github.com/ethers-io/ethers.js/blob/061b0eae1d4c570aedd9bee1971afa43fcdae1a6/src.ts/utils/address.ts#L22
I guess that duplication of
isValidAccountcan not be prevented as we need that method in both files?@@ -1,7 +1,9 @@import Component from '@ember/component';why is this now
ethAddressand wasaccountbefore?That's not a check, that's actually creating a checksum address from a non-checksum one.
@@ -1,7 +1,9 @@import Component from '@ember/component';Typo. Thanks.
It can, but that would be way more complex and require more code than the de-duplication is worth. In essence,
isAddressis what's already de-duplicated here, and using it on this or that property is just a declarative action.Good to merge.