Skip to content

Commit 94b5886

Browse files
committed
fix: soETH interst rate
1 parent 8ada7cb commit 94b5886

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

hooks/useSavingsYield.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,18 @@ export function useSavingsYield({
8484
}
8585

8686
// soFUSE CURRENT mode: use backend summary (no subgraph available for FUSE)
87-
// if (mode === SavingMode.CURRENT && vault === 'FUSE') {
88-
// if (summary) {
89-
// const backendInterest = parseFloat(summary.interestEarnedUSD);
90-
// const calculatedAtUnix = Math.floor(new Date(summary.calculatedAt).getTime() / 1000);
91-
// if (backendInterest >= 0 && calculatedAtUnix > 0) {
92-
// setLiveYield(backendInterest);
93-
// setAnchor({ value: backendInterest, time: calculatedAtUnix });
94-
// }
95-
// }
96-
// // No summary yet — keep current value until backend responds
97-
// return;
98-
// }
87+
if (mode === SavingMode.CURRENT && vault === 'FUSE') {
88+
if (summary) {
89+
const backendInterest = parseFloat(summary.interestEarnedUSD);
90+
const calculatedAtUnix = Math.floor(new Date(summary.calculatedAt).getTime() / 1000);
91+
if (backendInterest >= 0 && calculatedAtUnix > 0) {
92+
setLiveYield(backendInterest);
93+
setAnchor({ value: backendInterest, time: calculatedAtUnix });
94+
}
95+
}
96+
// No summary yet — keep current value until backend responds
97+
return;
98+
}
9999

100100
// soUSD / soETH: subgraph-based calculation
101101
let cancelled = false;

0 commit comments

Comments
 (0)