Skip to content

Commit

Permalink
fix: Less aggressive supply table filtering for oracle updates
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenshively authored Jun 10, 2024
1 parent 0a0df5d commit e62979c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions earn/src/pages/MarketsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ export default function MarketsPage() {
const kitty0Balance = balancesMap.get(pair.kitty0.address)?.value || 0;
const kitty1Balance = balancesMap.get(pair.kitty1.address)?.value || 0;

const oracleHasBeenUpdatedInPastWeek = pair.lastWrite.getTime() > Date.now() - 7 * 24 * 60 * 60 * 1000;
const oracleHasBeenUpdatedInPast2Weeks = pair.lastWrite.getTime() > Date.now() - 14 * 24 * 60 * 60 * 1000;

if (kitty0Balance > 0 || oracleHasBeenUpdatedInPastWeek) {
if (kitty0Balance > 0 || oracleHasBeenUpdatedInPast2Weeks) {
rows.push({
asset: pair.token0,
kitty: pair.kitty0,
Expand All @@ -220,7 +220,7 @@ export default function MarketsPage() {
: {}),
});
}
if (kitty1Balance > 0 || oracleHasBeenUpdatedInPastWeek) {
if (kitty1Balance > 0 || oracleHasBeenUpdatedInPast2Weeks) {
rows.push({
asset: pair.token1,
kitty: pair.kitty1,
Expand Down

0 comments on commit e62979c

Please sign in to comment.