Skip to content

Commit 87eef60

Browse files
author
Dan Hsu
committed
feature: modified house tvl
1 parent 1906970 commit 87eef60

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

projects/doubleup/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,16 @@ async function tvl(api) {
2020
const houseType = house?.type;
2121
const coinType = houseType.split("<")[1].split(">")[0];
2222

23-
const pipeDebt = house?.fields?.pipe_debt?.fields?.value;
24-
const houseTvl = Number(pipeDebt) + Number(house?.fields?.pool);
23+
const housePipeDebt = house?.fields?.house_pipe_debt?.fields?.value;
24+
const housePool = house?.fields?.house_pool;
25+
const houseTvl = Number(housePipeDebt) + Number(housePool);
2526

2627
api.add(coinType, houseTvl);
28+
29+
const pipeDebt = house?.fields?.pipe_debt?.fields?.value;
30+
const _tvl = Number(pipeDebt) + Number(house?.fields?.pool);
31+
32+
api.add(coinType, _tvl);
2733
}
2834
}
2935

0 commit comments

Comments
 (0)