Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getRecipientWarning(currency, recipient) {
if (!recipient.match(/^0x[0-9a-fA-F]{40}$/)) return null;
const slice = recipient.substr(2);
const isFullUpper = slice === slice.toUpperCase();
const isFullLower = slice === slice.toLowerCase();
if (isFullUpper || isFullLower) {
return new ETHAddressNonEIP();
}
return null;
}
function getRecipientWarning(currency, recipient) {
if (!recipient.match(/^0x[0-9a-fA-F]{40}$/)) return null
const slice = recipient.substr(2)
const isFullUpper = slice === slice.toUpperCase()
const isFullLower = slice === slice.toLowerCase()
if (isFullUpper || isFullLower) {
return new ETHAddressNonEIP()
}
return null
}