Skip to content

Commit

Permalink
fix: ensure percentage prop is always defined in streams
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes committed Nov 11, 2024
1 parent 4d4657e commit a2b4320
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export const StakingProvider = ({
return {
...stream,
apr: aprs.streams[i],
percentage: streamsProgress[i + 1],
percentage: streamsProgress[i + 1] ?? 0,
startTimestamp: firstScheduleTime
? firstScheduleTime.toNumber() * 1000
: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/types/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Stream = {
coingeckoName: CoingeckoToken;
decimals: number;
id: number;
percentage?: number;
percentage: number;
symbol: string;
name: string;
price?: number;
Expand Down

0 comments on commit a2b4320

Please sign in to comment.