Skip to content

Commit

Permalink
feat(neuron-ui): only addresses start with 0x0100 are valid
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Nov 8, 2019
1 parent 4d9caae commit 67be688
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/neuron-ui/src/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { MIN_PASSWORD_LENGTH, MAX_PASSWORD_LENGTH, MIN_AMOUNT, MAX_DECIMAL_DIGIT

export const verifyAddress = (address: string): boolean => {
try {
ckbCore.utils.parseAddress(address)
return true
return ckbCore.utils.parseAddress(address, 'hex').startsWith('0x0100')
} catch (err) {
return false
}
Expand Down

0 comments on commit 67be688

Please sign in to comment.