Skip to content

Commit

Permalink
sdk: filter sss account deposit records (#762)
Browse files Browse the repository at this point in the history
* sdk: filter sss account deposit records

* yarn prettify:fix

---------

Co-authored-by: Chris Heaney <[email protected]>
  • Loading branch information
ChesterSim and crispheaney authored Jan 5, 2024
1 parent 25313e4 commit 1e2d0ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/src/math/superStake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ export async function calculateSolEarned({
const now = Date.now() / 1000;
const timestamps: number[] = [
now,
...depositRecords.map((r) => r.ts.toNumber()),
...depositRecords
.filter((r) => r.marketIndex === marketIndex)
.map((r) => r.ts.toNumber()),
];

let lstRatios = new Map<number, number>();
Expand Down

0 comments on commit 1e2d0ab

Please sign in to comment.