Skip to content

Commit

Permalink
fix: lido apr
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypto-One-dev committed Jul 19, 2024
1 parent b07304c commit fe58744
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions src/lib/third-party/lido.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@ const get7MAAPRs = networkId => {
apiURL = LIDO_API_URLS.ETH
}

return 6.12

// return cachedAxios
// .get(apiURL)
// .then(response => {
// const data = get(response, `data.data.smaApr`)
// if (data) {
// return data
// } else {
// console.error(get(response, 'data.errors', response))
// return null
// }
// })
// .catch(error => {
// console.error(`Lido APRs api failed:`, error)
// return null
// })
return cachedAxios
.get(apiURL)

Check failure on line 12 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
.then(response => {

Check failure on line 13 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
const data = get(response, `data.data.smaApr`)

Check failure on line 14 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
if (data) {

Check failure on line 15 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Replace `····` with `······`
return data

Check failure on line 16 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
} else {

Check failure on line 17 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Replace `····` with `······`
console.error(get(response, 'data.errors', response))

Check failure on line 18 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
return null

Check failure on line 19 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
}

Check failure on line 20 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Insert `··`
})

Check failure on line 21 in src/lib/third-party/lido.js

View workflow job for this annotation

GitHub Actions / build (14.x, 4.4)

Replace `··` with `····`
.catch(error => {
console.error(`Lido APRs api failed:`, error)
return null
})
}

module.exports = { get7MAAPRs }

0 comments on commit fe58744

Please sign in to comment.