Skip to content

Commit

Permalink
(BIDS-2505) added ETH as hidden symbol (#2582)
Browse files Browse the repository at this point in the history
  • Loading branch information
remoterami authored Sep 29, 2023
1 parent 80baa39 commit 1c9dc89
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1235,16 +1235,19 @@ func FormatTokenSymbolTitle(symbol string) string {
urls := xurls.Relaxed.FindAllString(symbol, -1)

if len(urls) > 0 {
return "The token symbol has been hidden as it contains a URL which might be a scam"
return fmt.Sprintf("The token symbol has been hidden as it contains a URL (%s) which might be a scam", symbol)
} else if symbol == "ETH" {
return fmt.Sprintf("The token symbol has been hidden as it contains a Token name (%s) which might be a scam", symbol)
}
return ""
}

func FormatTokenSymbol(symbol string) string {
urls := xurls.Relaxed.FindAllString(symbol, -1)

if len(urls) > 0 {
return "[hidden-symbol]"
if len(urls) > 0 ||
symbol == "ETH" {
return "[hidden-symbol] ⚠️"
}
return symbol
}
Expand Down

0 comments on commit 1c9dc89

Please sign in to comment.