Skip to content

Commit

Permalink
topic variable reference corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
SibghatCodora committed Mar 30, 2024
1 parent c2a0dc3 commit b25a573
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const processTradingContractDataItem = async (
// Iterate through the logs in the transaction receipt
for (const log of receipt.logs) {
// Check if the log's address matches the token address and if the event topic is present in the log's topics
if (log.address.toLowerCase() === item.tokenContractAddress.toLowerCase() && log.topics.includes(buyLogs[0].topics[0])) {
if (log.address.toLowerCase() === item.tokenContractAddress.toLowerCase() && log.topics.includes(buyLogs[i].topics[0])) {
// Add the log to the matching events array
buyMatchingEvents.push(log);
}
Expand Down Expand Up @@ -173,7 +173,7 @@ export const processTradingContractDataItem = async (
null,
web3Instance.eth.abi.encodeParameter(
"address",
"0x20dDbFd14F316D417f5B1a981B5Dc926a4dFd4D1"
item.liquidityPoolAddress
),
],
};
Expand All @@ -193,7 +193,7 @@ export const processTradingContractDataItem = async (
// Iterate through the logs in the transaction receipt
for (const log of receipt.logs) {
// Check if the log's address matches the token address and if the event topic is present in the log's topics
if (log.address.toLowerCase() === item.tokenContractAddress.toLowerCase() && log.topics.includes(buyLogs[0].topics[0])) {
if (log.address.toLowerCase() === item.tokenContractAddress.toLowerCase() && log.topics.includes(sellLogs[i].topics[0])) {
// Add the log to the matching events array
sellMatchingEvents.push(log);
}
Expand Down

0 comments on commit b25a573

Please sign in to comment.