Update floCloudAPI.js
This commit is contained in:
parent
42b7c2aa61
commit
35128829d2
@ -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 = {});
|
||||
})('object' === typeof module ? module.exports : window.floCloudAPI = {});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user