Skip to content

Commit

Permalink
Limit channel rendered in the payout carousel (#4715)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan authored Aug 22, 2023
1 parent 6178ebc commit 25447b7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/atlas/src/api/hooks/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ export const useRecentlyPaidChannels = (): { channels: YPPPaidChannels[] | undef

return (
paymentMap &&
Array.from(paymentMap.values()).sort((a, b) => {
if (a.amount.gt(b.amount)) return -1
if (a.amount.lt(b.amount)) return 1
return 0
})
Array.from(paymentMap.values())
.sort((a, b) => {
if (a.amount.gt(b.amount)) return -1
if (a.amount.lt(b.amount)) return 1
return 0
})
.slice(0, 50)
.reverse()
)
}, [data])

Expand Down

0 comments on commit 25447b7

Please sign in to comment.