mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 22:43:12 +08:00
[crown-finance] bugfix
This commit is contained in:
@@ -42,14 +42,14 @@ async function getAllTVL(block) {
|
||||
data.forEach(({ output }) => {
|
||||
const token = output.lpToken.toLowerCase()
|
||||
const amount = output.amount0
|
||||
if (token === crown) balances.staking[transform(token)] = amount
|
||||
else tempBalances[token] = amount
|
||||
if (token === crown) sdk.util.sumSingleBalance(balances.staking, transform(token), amount)
|
||||
else sdk.util.sumSingleBalance(tempBalances, token, amount)
|
||||
lps.push(token)
|
||||
})
|
||||
|
||||
const pairs = await getLPData({ lps, chain, block })
|
||||
|
||||
const { updateBalances, prices, pairBalances } = await getTokenPrices({ lps: Object.keys(pairs), allLps: true, coreAssets: [ tether ], block, chain, minLPRatio: 0.001 })
|
||||
const { updateBalances, } = await getTokenPrices({ lps: Object.keys(pairs), allLps: true, coreAssets: [tether], block, chain, minLPRatio: 0.001 })
|
||||
Object.entries(tempBalances).forEach(([token, balance]) => {
|
||||
if (pairs[token]) {
|
||||
const { token0Address, token1Address } = pairs[token]
|
||||
|
||||
Reference in New Issue
Block a user