symbol-sdk-typescript-javascript
symbol-sdk-typescript-javascript copied to clipboard
Address.createFromRawAddress is not validating checksum
When a user is creating an address, the constructor should be validating the checksum by default and not expect the user to call Address.isValidRawAddress before...
https://github.com/symbol/symbol-sdk-typescript-javascript/blob/main/src/model/account/Address.ts#L45
Note, I've added the validation and this breaks several invalid unit tests where the addresses are invalid.
createFromRawAddress - imo it should not do validation, you should be able anything that has size of raw address... if user (read: developer) wants to validate, there should be explicit call to isValid()
cc: @Jaguar0625
i agree validation should probably happen at some higher layer