de-dot-fi / defiyield-self-integrations

9 stars 35 forks source link

fix: Add protection to the API request (XY Finance) #43

Closed cy-phiz closed 1 year ago

cy-phiz commented 1 year ago

What's wrong?

The module veXY would crash if the API request to the server does not work as expected.

How do I fix it?

Add a try catch to the API request to protect the module from crashing entirely. If the API request fail, put 0 as the default APR for the pool.

cy-phiz commented 1 year ago

Thanks for the review, fixed the format!