Skip to content

Commit

Permalink
FIX: lower case underlying mapping addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
Samster91 committed Nov 13, 2023
1 parent c4a7d41 commit 8584655
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projects/idle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ const contracts = {
}

const underlyingMapping = {
[ADDRESSES.optimism.USDT]: ADDRESSES.ethereum.USDT, // USDT Optimism
[ADDRESSES.optimism.USDC]: ADDRESSES.ethereum.USDC, // USDC Optimism
'0x1E4a5963aBFD975d8c9021ce480b42188849D41d': ADDRESSES.ethereum.USDT, // USDT zkEVM
[ADDRESSES.polygon_zkevm.USDC]: ADDRESSES.ethereum.USDC // USDC zkEVM
[ADDRESSES.optimism.USDT.toLowerCase()]: ADDRESSES.ethereum.USDT, // USDT Optimism
[ADDRESSES.optimism.USDC.toLowerCase()]: ADDRESSES.ethereum.USDC, // USDC Optimism
'0x1e4a5963abfd975d8c9021ce480b42188849d41d': ADDRESSES.ethereum.USDT, // USDT zkEVM
[ADDRESSES.polygon_zkevm.USDC.toLowerCase()]: ADDRESSES.ethereum.USDC // USDC zkEVM
}

const trancheConfig = {
Expand Down Expand Up @@ -147,7 +147,7 @@ async function tvl(time, ethBlock, chainBlocks, { api }) {
}

// Get CDOs underlying tokens balances
const mappedToken = underlyingMapping[token[i]] || token[i]
const mappedToken = underlyingMapping[token[i].toLowerCase()] || token[i]
balances[mappedToken] = BigNumber(balances[mappedToken] || 0).plus(BigNumber(contractValue[i] || 0))
})
}
Expand Down

0 comments on commit 8584655

Please sign in to comment.