Skip to content

Commit

Permalink
Merge pull request #30 from 0xShadowScripter/develop
Browse files Browse the repository at this point in the history
topic variable reference corrected
  • Loading branch information
zikriya authored Mar 30, 2024
2 parents 8f3f725 + b25a573 commit ef6a6b0
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 ef6a6b0

Please sign in to comment.