File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments