diff --git a/src/cloud.js b/src/cloud.js index f3b9041..db79b44 100644 --- a/src/cloud.js +++ b/src/cloud.js @@ -125,7 +125,11 @@ function proxyID(address) { 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 { @@ -157,4 +161,4 @@ Object.defineProperties(cloud, { order: { get: () => kBucket.order } -}); \ No newline at end of file +});