Skip to content

Commit 6bb0557

Browse files
authored
Fix: Astherus (DefiLlama#15373)
1 parent 3733475 commit 6bb0557

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

projects/astherus/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ module.exports = {
1010
start: '2024-01-31', // 02/01/2024 @ 00:00:00pm (UTC)
1111
}
1212

13+
function checkEvmAddress(addr) {
14+
return /^0x[a-fA-F0-9]{40}$/.test(addr)
15+
}
16+
1317
Object.keys(config).forEach(chain => {
1418
const vault = config[chain]
1519
module.exports[chain] = {
1620
tvl: async (api) => {
1721
const { data } = await getConfig(`astherus/${api.chain}`, `https://astherus.finance/bapi/futures/v1/public/future/web3/ae-deposit-asset?chainId=${api.chainId}`)
18-
const tokens = data.map(i => i.contractAddress)
22+
const tokens = data.map(i => i.contractAddress).filter(checkEvmAddress)
1923
return api.sumTokens({ owner: vault, tokens })
2024
}
2125
}

0 commit comments

Comments
 (0)