Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
trungnt1811 committed May 31, 2024
1 parent 543cb9f commit cc95125
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion airdrop/chains/cosmosnft.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ func Cosmosnft(contract string, percent int64) ([]banktypes.Balance, []config.Re
return balanceInfo, rewardInfo, len(balanceInfo), nil
}
}
}
}
6 changes: 3 additions & 3 deletions airdrop/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func FetchTokenInfo(token, contractAddress, apiFromConfig string) (config.NftHol
queryString := fmt.Sprintf(`{"all_nft_info":{"token_id":%s}}`, token)
encodedQuery := base64.StdEncoding.EncodeToString([]byte(queryString))
apiURL := apiFromConfig + "/cosmwasm/wasm/v1/contract/" + contractAddress + "/smart/" + encodedQuery

ctx := context.Background()

var response *http.Response
Expand All @@ -347,7 +347,7 @@ func FetchTokenInfo(token, contractAddress, apiFromConfig string) (config.NftHol
if err := backoff.Retry(retryableRequest, exponentialBackoff); err != nil {
return config.NftHolder{}, fmt.Errorf("error making GET request to fetch token info: %w", err)
}

defer response.Body.Close()

var data config.TokenInfoResponse
Expand All @@ -366,7 +366,7 @@ func FetchTokenInfo(token, contractAddress, apiFromConfig string) (config.NftHol
}, nil
}

func FetchTokenIds(contractAddress string, apiFromConfig string) ([]string, error) {
func FetchTokenIds(contractAddress, apiFromConfig string) ([]string, error) {
// Make a GET request to the API
paginationKey := "0"
index := 0
Expand Down

0 comments on commit cc95125

Please sign in to comment.