Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
} else {
const { takerAssetFillAmount } = quote;
txHash = await this._contractWrappers.exchange.marketSellOrdersNoThrow.sendTransactionAsync(
orders,
takerAssetFillAmount,
orders.map(o => o.signature),
{
from: finalTakerAddress,
gas: gasLimit,
gasPrice,
},
);
}
return txHash;
} catch (err) {
if (_.includes(err.message, ContractError.SignatureRequestDenied)) {
throw new Error(SwapQuoteConsumerError.SignatureRequestDenied);
} else if (_.includes(err.message, ForwarderError.CompleteFillFailed)) {
throw new Error(SwapQuoteConsumerError.TransactionValueTooLow);
} else {
throw err;
}
}
}
}