Skip to content

Commit

Permalink
2.2.5 - Limit error return to a single API.
Browse files Browse the repository at this point in the history
  • Loading branch information
transilvlad committed May 16, 2021
1 parent 7b8b072 commit b177e62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ _Please do keep in mind at this point there are a lot of differences between thi
- Version 2.2.1
- Update ATH every time it's lower than 24h high.

- Version 2.2.2-4
- Version 2.2.2-5
- Updated sheet formulas.
- Added error returning to UI.
- Limit error return to a single API.


## Planned updates
Expand Down
4 changes: 2 additions & 2 deletions source/APICoinGecko.gs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function geckoCoins(ui, fiat, ids) {
enableCache();
var json = importJson("https://api.coingecko.com/api/v3/coins/markets?vs_currency=" + fiat + "&ids=" + ids);

if(typeof(json) === "string") {
if(typeof(json) === "string" && getCryptoCompareKey() == "") {
ui.alert('CoinGecko API error: ' + json);

} else if(typeof(json) === "object") {
Expand Down Expand Up @@ -52,7 +52,7 @@ function geckoFlux(ui, fiat, coin, limit, interval) {
enableCache();
var json = importJson("https://api.coingecko.com/api/v3/coins/" + coins[coin] + "/market_chart?vs_currency=" + fiat + "&days=" + limit + "&interval=" + interval);

if(typeof(json) === "string") {
if(typeof(json) === "string" && getCryptoCompareKey() == "") {
ui.alert('CoinGecko API error: ' + json);

} else {
Expand Down

0 comments on commit b177e62

Please sign in to comment.