mirror of https://github.com/qortal/qortal-ui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
260 B
13 lines
260 B
3 years ago
|
import Base58 from '../deps/Base58.js'
|
||
|
|
||
|
|
||
|
export const validateAddress = (address) => {
|
||
|
const decodePubKey = Base58.decode(address)
|
||
|
|
||
|
if (!(decodePubKey instanceof Uint8Array && decodePubKey.length == 25)) {
|
||
|
return false
|
||
|
}
|
||
|
return true
|
||
|
|
||
|
}
|