Skip to content

Commit

Permalink
chore: compute price change if sortedOracleDailyPrices > 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Jun 7, 2024
1 parent f6ee73a commit 74a5628
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/TokenPrices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function TokenPrices({ title = 'Summary', data, isLoading }: Props) {
// Determine 24h change in oracle price
const sortedOracleDailyPrices = token?.oracleDailyPrices?.sort((a, b) => b.dateKey - a.dateKey);
const changeValue =
sortedOracleDailyPrices.length > 0
sortedOracleDailyPrices.length > 2
? (() => {
const oraclePriceYesterday =
sortedOracleDailyPrices[0].typeOutAmountLast / sortedOracleDailyPrices[0].typeInAmountLast;
Expand Down

0 comments on commit 74a5628

Please sign in to comment.