Skip to content

Commit

Permalink
TOK-412: List all activated builders (#369)
Browse files Browse the repository at this point in the history
* feat: list all the activated builders

* chore: apply small fixes and leave placeholder for future changes

* chore: remove duplicate code

* style: apply lint rules

* feat: allow table sort

* chore: small ui improvements

* fix: change arrow orintation

* fix: remove mocked data

* fix: lint

* chore: feedback improvements

* fix: last cycle rewards

---------

Co-authored-by: Antonio <[email protected]>
Co-authored-by: Francisco Tobar <[email protected]>
  • Loading branch information
3 people authored and shenshin committed Nov 20, 2024
1 parent 18f8f28 commit 44ea629
Show file tree
Hide file tree
Showing 30 changed files with 951 additions and 330 deletions.
419 changes: 419 additions & 0 deletions src/app/collective-rewards/leaderboard/BuildersLeaderBoardTable.tsx

Large diffs are not rendered by default.

246 changes: 0 additions & 246 deletions src/app/collective-rewards/leaderboard/LeaderBoard.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/app/collective-rewards/leaderboard/hooks/index.ts

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions src/app/collective-rewards/leaderboard/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './hooks'
export * from './LeaderBoard'
export * from './BuildersLeaderBoardTable'
4 changes: 2 additions & 2 deletions src/app/collective-rewards/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { LeaderBoard } from '@/app/collective-rewards/leaderboard'
import { BuildersLeaderBoard } from '@/app/collective-rewards/leaderboard'
import { Metrics } from '@/app/collective-rewards/metrics'
import { WhitelistContextProviderWithBuilders, WhitelistSection } from '@/app/collective-rewards/whitelist'
import { MainContainer } from '@/components/MainContainer/MainContainer'
Expand All @@ -13,7 +13,7 @@ export default function BuildersIncentiveMarket() {
<WhitelistContextProviderWithBuilders>
<WhitelistSection />
</WhitelistContextProviderWithBuilders>
<LeaderBoard />
<BuildersLeaderBoard />
</div>
</MainContainer>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const TokenRewards: FC<TokenRewardsProps> = ({ builder, gauge, token: { id, symb

const rewardsAmount = rewardPercentage ? applyPrecision(rewards * rewardPercentage) : 0n

// rewardsAmountGauge = rewardsAmount * rewardShares / totalPotentialRewards
// rewardsAmountBuilder = rewardsAmount * (1 - rewardPercentage) / totalPotentialRewards
const estimatedRewards =
rewardShares && totalPotentialRewards ? (rewardShares * rewardsAmount) / totalPotentialRewards : 0n
const estimatedRewardsInHuman = Number(formatBalanceToHuman(estimatedRewards))
Expand Down
1 change: 1 addition & 0 deletions src/app/collective-rewards/rewards/builders/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from './useClaimBuilderRewards'
export * from './useGetBuilderRewards'
export * from './useGetBuilderRewardsClaimedLogs'
export * from './useGetRewardPercentageToApply'
export * from './useGetBuildersRewards'
Loading

0 comments on commit 44ea629

Please sign in to comment.