Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mergeMap(accounts => {
const data = encode({
accounts,
settings: {
pairExchanges: {},
currenciesSettings: {}
},
exporterName: "ledger-live-cli",
exporterVersion: "0.0.0"
});
const frames = dataToFrames(data, 80, 4);
if (opts.out) {
return of(Buffer.from(JSON.stringify(frames)).toString("base64"));
} else {
const qrObservables = frames.map(str =>
asQR(str).pipe(shareReplay())
);
return interval(300).pipe(
mergeMap(i => qrObservables[i % qrObservables.length])
);
}
}),
tap(() => console.clear()) // eslint-disable-line no-console