Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const walletFromShards = async () => {
const s1 = shard1 === '' ? undefined : shard1;
const s2 = shard2 === '' ? undefined : shard2;
const s3 = shard3 === '' ? undefined : shard3;
let ticket = undefined;
try {
ticket = kg.combine([s1, s2, s3]);
} catch (_) {
// do nothing
}
if (ticket !== undefined) {
const uhdw = await urbitWalletFromTicket(ticket, pointName, passphrase);
setUrbitWallet(Just(uhdw));
}
};