Skip to content

Commit

Permalink
Do not tag own address
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Feb 27, 2024
1 parent 0d38f6f commit b3a61f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ class TransferEventInstance(
if (from == userAddress) {
tags.add(TransactionTag.tokenOutgoing(contractAddress.hex))
tags.add(TransactionTag.OUTGOING)
tags.add(TransactionTag.toAddress(to.hex))
}

if (to == userAddress) {
tags.add(TransactionTag.tokenIncoming(contractAddress.hex))
tags.add(TransactionTag.INCOMING)
tags.add(TransactionTag.fromAddress(from.hex))
}

tags.add(TransactionTag.fromAddress(from.hex))
tags.add(TransactionTag.toAddress(to.hex))

return tags
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,14 @@ class Eip1155TransferEventInstance(
if (from == userAddress) {
add(TransactionTag.tokenOutgoing(contractAddress.hex))
add(TransactionTag.OUTGOING)
add(TransactionTag.toAddress(to.hex))
}

if (to == userAddress) {
add(TransactionTag.tokenIncoming(contractAddress.hex))
add(TransactionTag.INCOMING)
add(TransactionTag.fromAddress(from.hex))
}

add(TransactionTag.fromAddress(from.hex))
add(TransactionTag.toAddress(to.hex))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ class Eip721TransferEventInstance(
if (from == userAddress) {
add(TransactionTag.tokenOutgoing(contractAddress.hex))
add(TransactionTag.OUTGOING)
add(TransactionTag.toAddress(to.hex))
}

if (to == userAddress) {
add(TransactionTag.tokenIncoming(contractAddress.hex))
add(TransactionTag.INCOMING)
add(TransactionTag.fromAddress(from.hex))
}

add(TransactionTag.fromAddress(from.hex))
add(TransactionTag.toAddress(to.hex))
}

companion object {
Expand Down

0 comments on commit b3a61f3

Please sign in to comment.