Skip to content

Commit

Permalink
fix: pickle tvl ssl err
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Sep 7, 2023
1 parent 19d2ba2 commit 1a2d7c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yearn/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ async def apy(self, _: ApySamples) -> Apy:

@eth_retry.auto_retry
async def tvl(self, block=None) -> Tvl:
data = requests.get("https://api.pickle.finance/prod/protocol/value").json()
try:
data = requests.get("https://api.pickle.finance/prod/protocol/value").json()
except requests.exceptions.SSLError as e:
return Tvl(tvl=None)
tvl = data[self.id]
return Tvl(tvl=tvl)

Expand Down

0 comments on commit 1a2d7c0

Please sign in to comment.