Update cloud.js
This commit is contained in:
parent
d445a389fc
commit
c5f4e61678
@ -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
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user