Increase browser compatibility
This commit is contained in:
parent
c104df77a0
commit
818fe7e67c
2 changed files with 4 additions and 3 deletions
|
@ -97,7 +97,7 @@ onmessage = function (event) {
|
||||||
try {
|
try {
|
||||||
getVanityWallet(input.hex, input.checksum, input.suffix, (message) => postMessage(message));
|
getVanityWallet(input.hex, input.checksum, input.suffix, (message) => postMessage(message));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
self.postMessage({error: err.toString()}, '*');
|
self.postMessage({error: err.toString()});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -66,8 +66,9 @@
|
||||||
|
|
||||||
function mixCase(str) {
|
function mixCase(str) {
|
||||||
let ret = '';
|
let ret = '';
|
||||||
for (let i of str) {
|
for (let i = 0; i < str.length; i++) {
|
||||||
ret += Math.random() < 0.5 ? i.toUpperCase() : i.toLowerCase();
|
const l = str.substr(i, 1);
|
||||||
|
ret += Math.random() < 0.5 ? l.toUpperCase() : l.toLowerCase();
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue