diff --git a/scripts/floCloudAPI.js b/scripts/floCloudAPI.js index db50d11..057fb38 100644 --- a/scripts/floCloudAPI.js +++ b/scripts/floCloudAPI.js @@ -418,7 +418,11 @@ bytes = ripemd160(Crypto.SHA256(Crypto.util.hexToBytes(address), { asBytes: true })); + } else if ((address.length == 42 && address.startsWith("0x")) || (address.length == 40 && !address.startsWith("0x"))){ //Ethereum Address + if (address.startsWith("0x")) { address = address.substring(2);} + bytes = Crypto.util.hexToBytes(address), { asBytes: true }; } + if (!bytes) throw "Invalid address: " + address; else { @@ -1103,4 +1107,4 @@ })(); -})('object' === typeof module ? module.exports : window.floCloudAPI = {}); \ No newline at end of file +})('object' === typeof module ? module.exports : window.floCloudAPI = {});