Skip to content

Commit

Permalink
fix(eventindexer): fixing lint
Browse files Browse the repository at this point in the history
  • Loading branch information
k-kaddal committed Jun 13, 2024
1 parent c35146e commit 94b203f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/eventindexer/indexer/fetch_nft_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func resolveMetadataURL(tokenURI string) (string, error) {
if isValidURL(resolvedURL) {

Check failure on line 92 in packages/eventindexer/indexer/fetch_nft_metadata.go

View workflow job for this annotation

GitHub Actions / lint-eventindexer

only one cuddle assignment allowed before if statement (wsl)
return resolvedURL, nil
}

return "", eventindexer.ErrInvalidURL
}

Expand All @@ -106,6 +107,7 @@ func isValidURL(rawURL string) bool {
client := &http.Client{
Timeout: 20 * time.Second,
}

resp, err := client.Head(rawURL)
if err != nil || resp.StatusCode != http.StatusOK {
return false
Expand Down
1 change: 0 additions & 1 deletion packages/eventindexer/nft_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type NFTMetadataRepository interface {

func (n *NFTMetadata) UnmarshalJSON(data []byte) error {
type Alias NFTMetadata

aux := &struct {

Check failure on line 43 in packages/eventindexer/nft_metadata.go

View workflow job for this annotation

GitHub Actions / lint-eventindexer

assignments should only be cuddled with other assignments (wsl)
ImageURL string `json:"image_url"`
Image string `json:"image"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (srv *Server) GetNFTBalancesByAddressAndChainID(c echo.Context) error {
}

var balancesWithMetadata []NFTBalanceWithMetadata

for _, balance := range *balances {
metadata, err := srv.nftMetadataRepo.GetNFTMetadata(
c.Request().Context(),
Expand Down

0 comments on commit 94b203f

Please sign in to comment.