-
Notifications
You must be signed in to change notification settings - Fork 58
Labels
toolingIssues related to the Tooling teamIssues related to the Tooling teamts-sdkIssues related to the TS SDKIssues related to the TS SDK
Description
Bug description
If one provides an invalid input to normalizeIotaAddress() it will not return an error, but an invalid string which is not a valid address
Steps To reproduce the bug
import { normalizeIotaAddress } from '@iota/iota-sdk/utils';
// Doesn't care if it's invalid hex chars
console.log(normalizeIotaAddress(" xyz"))
// Empty space isn't checked
console.log(normalizeIotaAddress(" 0xf60e1cb99687c246c307b637bee7fb5e25b5164c250c628cce83df03b32cbd1a"))
prints
0x000000000000000000000000000000000000000000000000000000000000 xyz
0x 0xf60e1cb99687c246c307b637bee7fb5e25b5164c250c628cce83df03b32cbd1a
Expected behaviour
Should return an error
Actual behaviour
Returns strings that aren't valid addresses
Metadata
Metadata
Assignees
Labels
toolingIssues related to the Tooling teamIssues related to the Tooling teamts-sdkIssues related to the TS SDKIssues related to the TS SDK