Update floCrypto.js

This commit is contained in:
tripathyr 2023-10-15 17:11:59 +05:30 committed by GitHub
parent 16906d7acc
commit dd93f05a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -431,9 +431,13 @@
} else
return null;
} else if ((address.length == 42 && address.startsWith("0x")) || (address.length == 40 && !address.startsWith("0x"))) { //Ethereum Address
if (address.startsWith("0x")) { address = address.substring(2); }
let bytes = Crypto.util.hexToBytes(address);
return {
version: 1,
hex: address,
type: 'ethereum'
type: 'ethereum',
bytes
}
}
}
@ -534,4 +538,4 @@
m => String.fromCharCode(parseInt(m.replace(/\\u/g, ''), 16)));
}
})('object' === typeof module ? module.exports : window.floCrypto = {});
})('object' === typeof module ? module.exports : window.floCrypto = {});