Skip to content

Commit

Permalink
fixed issued depth undefined value (#3107)
Browse files Browse the repository at this point in the history
  • Loading branch information
karen-stepanyan authored Nov 29, 2023
1 parent 3f6bf29 commit 1cda6f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gentle-glasses-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/synthetix-debt-pool-adapter': patch
---

Fixed bug with issued dept being undefined
2 changes: 1 addition & 1 deletion packages/sources/synthetix-debt-pool/src/endpoint/debt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const getDebtIssued = async (
let debtIssued
try {
const debtCache = new ethers.Contract(debtCacheAddress, DEBT_CACHE_ABI, networkProvider)
debtIssued = await debtCache.currentDebt({ blockTag: blockNumber })[0]
debtIssued = (await debtCache.currentDebt({ blockTag: blockNumber }))[0]
} catch (e) {
return errorResponse(
e,
Expand Down

0 comments on commit 1cda6f0

Please sign in to comment.