Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// The code below the return is not yet production ready.
pHandler.webContents.send('openUri', url);
pHandler.show();
return;
log.info('app: open-url', url);
const opts = {
textEncoder,
textDecoder,
zlib: {
deflateRaw: (data) => new Uint8Array(zlib.deflateRawSync(Buffer.from(data))),
inflateRaw: (data) => new Uint8Array(zlib.inflateRawSync(Buffer.from(data))),
},
};
// Interpret the Signing Request
const request = SigningRequest.from(url, opts);
// Extract relevant information
const {
auths,
blockchains,
wallets,
whitelist
} = store.getState();
const chainId = request.getChainId().toLowerCase();
log.info("requested chainId")
log.info(chainId)
const blockchain = find(blockchains, { chainId });
log.info("blockchain")
log.info(JSON.stringify(blockchain))