Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
log.log(
'doRender: nextStore.equals(savedStore) -- skipping setValue'
);
}
// logHTML("Updated savedHTML", renderedString)
var tPostSyncUpdate = performance.now();
log.info(
'syncChromeWindows and update complete: ',
tPostSyncUpdate - tPreRender,
' ms'
);
}
} catch (e) {
log.error('renderPopup: caught exception invoking function: ');
log.error(e.stack);
throw e;
}
}
async updatePendingTxs () {
// in order to keep the nonceTracker accurate we block it while updating pending transactions
const nonceGlobalLock = await this.nonceTracker.getGlobalLock()
try {
const pendingTxs = this.getPendingTransactions()
await Promise.all(pendingTxs.map((txMeta) => this._checkPendingTx(txMeta)))
} catch (err) {
log.error('PendingTransactionTracker - Error updating pending transactions')
log.error(err)
}
nonceGlobalLock.releaseLock()
}
${code}
`;
try {
return format(
renderSync({
data,
includePaths: [tempStylesDir],
}).css.toString(),
"css"
);
} catch (e) {
log.error("Unable to compile an example with the following code:");
log.error(code);
log.error();
log.error(e.message);
process.exit(1);
}
}
public getConfigById(id: string): ServiceConfiguration | undefined {
if (this.configurations) {
return find(this.configurations, service => {
return !!service.id && service.id.toLowerCase() === id.toLowerCase();
});
}
console.error("Configuration not initialized.");
}
}
resolveWithFullResponse: true,
headers: {
'User-Agent': 'https://github.com/bitoiu',
'Accept': 'application/vnd.github.v3+json'
},
qs: {
access_token: process.env.GH_TOKEN,
role: 'admin'
}
}
try {
let response = await request.get(options)
if (response.statusCode != 200) {
if (response.statusCode != 404) {
log.error('404 Error: Sometimes this happens when the current repository is not part of an organization, but an user account instead.')
}
log.error(response.statusCode)
process.exit(1)
}
let owners_list = JSON.parse(response.body).map(user => user.login)
log.trace(response.body)
log.debug('List of owners:' + owners_list)
return owners_list
} catch (err) {
log.error(err)
process.exit(1)
}
}
ipcRenderer.on('action', (event, action) => {
if (typeof action === 'object' && action.type) {
return store.dispatch(action);
}
logger.error('Received invalid action', action);
});
}).catch(err => {
logger.error(err);
});
},
.catch((reason) => {
log.error(`Problem updating balances`, reason)
this.setState({ isLoading: false })
})
}
graphQLErrors.forEach(({ message, locations, path }) =>
log.error(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`)
)
.catch(function(err) {
log.error('Problem initializing notification', err, err.stack);
});