Skip to content

Commit

Permalink
feat(cr_v2): backer rewards table
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscotobar committed Nov 21, 2024
1 parent 3af4fce commit 8c5bcf5
Show file tree
Hide file tree
Showing 49 changed files with 941 additions and 1,027 deletions.
14 changes: 1 addition & 13 deletions src/app/collective-rewards/actions.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
import { Address } from 'viem'
import { BackersManagerAddress, SimplifiedRewardDistributorAddress } from '@/lib/contracts'
import { BackersManagerAddress } from '@/lib/contracts'
import { axiosInstance } from '@/lib/utils'
import {
fetchBackerRewardsClaimedLogsByAddress,
fetchBuilderRewardsClaimedLogsByAddress,
fetchGaugeNotifyRewardLogsByAddress,
fetchNotifyRewardLogsByAddress,
fetchRewardDistributedLogsByAddress,
} from '@/lib/endpoints'

export const fetchRewardDistributedLogs = (fromBlock = 0) => {
return axiosInstance.get(
fetchRewardDistributedLogsByAddress
.replace('{{address}}', SimplifiedRewardDistributorAddress)
.replace('{{fromBlock}}', fromBlock.toString()),
)
}

export const fetchRewardDistributedCached = () =>
axiosInstance.get('/reward-distributed/api', { baseURL: '/' })

export const fetchNotifyRewardLogs = (fromBlock = 0) => {
return axiosInstance.get(
fetchNotifyRewardLogsByAddress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { withSpinner } from '@/components/LoadingSpinner/withLoadingSpinner'
import { Paragraph } from '@/components/Typography'
import { ethers } from 'ethers'
import { useAccount } from 'wagmi'
import { useHandleErrors } from '../utils'
import { useHandleErrors } from '@/app/collective-rewards/utils'
import { useBackerTotalAllocation } from './useBackerTotalAllocation'

type ValueProps = {
Expand Down
1 change: 0 additions & 1 deletion src/app/collective-rewards/hooks/index.ts

This file was deleted.

65 changes: 0 additions & 65 deletions src/app/collective-rewards/hooks/useGaugesGetFunction.ts

This file was deleted.

Loading

0 comments on commit 8c5bcf5

Please sign in to comment.