Skip to content

Commit

Permalink
start to implement something that makes clear if a sweep was a sweep …
Browse files Browse the repository at this point in the history
…or someone dumped into blur bids
  • Loading branch information
benleb committed Apr 21, 2023
1 parent 5daa9e3 commit 4cded54
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions internal/trapri/trapri.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,16 @@ func formatTokenTransaction(gb *gloomberg.Gloomberg, ttx *totra.TokenTransaction
// show "from" if its a transfer or a watched address
if !ttx.IsListing() {
var fmtFrom string
uniqueFrom := make(map[common.Address]int)

if tfFrom := ttx.GetNFTSenderAddresses(); len(tfFrom) > 0 {
uniqueFrom := make(map[common.Address]bool)

for _, fromAddr := range tfFrom {
uniqueFrom[fromAddr] = true
if tfFrom := ttx.GetNFTSenders(); len(tfFrom) > 0 {
for fromAddr, transfers := range tfFrom {
uniqueFrom[fromAddr] = len(transfers)
transferFrom = fromAddr

// if uniqueFrom[fromAddr] > 1 {
// gbl.Log.Infof("🤷 transferFrom addresses: %+v", uniqueFrom)
// }
}

if len(uniqueFrom) > 1 {
Expand All @@ -594,6 +597,10 @@ func formatTokenTransaction(gb *gloomberg.Gloomberg, ttx *totra.TokenTransaction
}

out.WriteString(fmtFrom)

if uniqueFrom[transferFrom] > 1 {
out.WriteString(fmt.Sprintf(" (%d)", uniqueFrom[transferFrom]))
}
}

// buyer
Expand Down

0 comments on commit 4cded54

Please sign in to comment.