Skip to content

Commit bef718d

Browse files
committed
show token rank in history
1 parent 1251127 commit bef718d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/trapri/trapri.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ func formatTokenTransaction(gb *gloomberg.Gloomberg, seawa *seawatcher.SeaWatche
211211
}
212212

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

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

295296
if isOwnCollection {
296297
currentCollection = collection

0 commit comments

Comments
 (0)