We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58daf2e commit f3e46acCopy full SHA for f3e46ac
internal/handlers/token_handlers.go
@@ -53,6 +53,10 @@ func GetTokenBalancesByType(c *gin.Context) {
53
tokenType = c.Query("token_type")
54
}
55
56
+ if tokenType != "" && tokenType != "erc20" && tokenType != "erc1155" && tokenType != "erc721" {
57
+ api.BadRequestErrorHandler(c, fmt.Errorf("invalid token type '%s'", tokenType))
58
+ return
59
+ }
60
owner := strings.ToLower(c.Param("owner"))
61
if !strings.HasPrefix(owner, "0x") {
62
api.BadRequestErrorHandler(c, fmt.Errorf("invalid owner address '%s'", owner))
0 commit comments