Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
indexer.ready.then(async () => {
const router = new Router({ requireAuthentication: false, address: ethers.Wallet.createRandom().address })
try {
const intents = await indexer.getIntents()
const { method, senderToken, signerToken, senderParam, signerParam } = message
const filteredIntents = intents.filter(intent => {
if (
intent.signerToken === signerToken.toLowerCase() && // eslint-disable-line
intent.senderToken === senderToken.toLowerCase() && // eslint-disable-line
intent.locatorType === 'https'
) {
return true
}
return false
})
if (method === 'getSenderSideQuotes') {
const quotePromises = filteredIntents.map(intent => {