Skip to content

Commit 67be688

Browse files
committed
feat(neuron-ui): only addresses start with 0x0100 are valid
1 parent 4d9caae commit 67be688

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/neuron-ui/src/utils/validators.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { MIN_PASSWORD_LENGTH, MAX_PASSWORD_LENGTH, MIN_AMOUNT, MAX_DECIMAL_DIGIT
44

55
export const verifyAddress = (address: string): boolean => {
66
try {
7-
ckbCore.utils.parseAddress(address)
8-
return true
7+
return ckbCore.utils.parseAddress(address, 'hex').startsWith('0x0100')
98
} catch (err) {
109
return false
1110
}

0 commit comments

Comments
 (0)