Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async walletFromShards(shard1, shard2, shard3, pointName, passphrase) {
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);
this.props.setUrbitWallet(Just(uhdw));
}
}