Skip to content

Commit

Permalink
show token rank in history
Browse files Browse the repository at this point in the history
  • Loading branch information
benleb committed Jun 16, 2023
1 parent 1251127 commit bef718d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/trapri/trapri.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ func formatTokenTransaction(gb *gloomberg.Gloomberg, seawa *seawatcher.SeaWatche
}

// add rank if available
var fmtRank string
if gb.Ranks[transfer.Token.Address] != nil {
if rank := gb.Ranks[transfer.Token.Address][transfer.Token.ID.Int64()].Rank; rank > 0 {
topX := float64(rank) / float64(collection.Metadata.TotalSupply)
Expand Down Expand Up @@ -290,7 +291,7 @@ func formatTokenTransaction(gb *gloomberg.Gloomberg, seawa *seawatcher.SeaWatche
}

fmtTokenIds[transfer.Token.Address] = append(fmtTokenIds[transfer.Token.Address], style.TerminalLink(openseaURL, fmtTokenID.String())+fmtTotalSupply)
fmtHistoryTokenIds[transfer.Token.Address] = append(fmtHistoryTokenIds[transfer.Token.Address], formatTokenID(collection, transfer.Token.ID)+fmtTotalSupply)
fmtHistoryTokenIds[transfer.Token.Address] = append(fmtHistoryTokenIds[transfer.Token.Address], fmtRank+formatTokenID(collection, transfer.Token.ID)+fmtTotalSupply)

if isOwnCollection {
currentCollection = collection
Expand Down

0 comments on commit bef718d

Please sign in to comment.