mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 11:27:59 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { isHex } from '@pezkuwi/util';
|
||||
import { isEthereumChecksum } from './isChecksum.js';
|
||||
export function isEthereumAddress(address) {
|
||||
if (!address || address.length !== 42 || !isHex(address)) {
|
||||
return false;
|
||||
}
|
||||
else if (/^(0x)?[0-9a-f]{40}$/.test(address) || /^(0x)?[0-9A-F]{40}$/.test(address)) {
|
||||
return true;
|
||||
}
|
||||
return isEthereumChecksum(address);
|
||||
}
|
||||
Reference in New Issue
Block a user