Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOK-408: estimated rewards #358

Merged
merged 1 commit into from
Nov 12, 2024
Merged

TOK-408: estimated rewards #358

merged 1 commit into from
Nov 12, 2024

Conversation

franciscotobar
Copy link
Contributor

@franciscotobar franciscotobar commented Nov 11, 2024

What

  • Estimated rewards

Link

@franciscotobar franciscotobar force-pushed the TOK-408/estimated-rewards branch from 1da3d69 to 63fb1e8 Compare November 11, 2024 01:37
@franciscotobar franciscotobar marked this pull request as ready for review November 11, 2024 01:37
@franciscotobar franciscotobar force-pushed the TOK-408/estimated-rewards branch from 63fb1e8 to 08e92e7 Compare November 11, 2024 01:41
import { tokenContracts } from '@/lib/contracts'
import { Popover } from '@/components/Popover'
import { Button } from '@/components/Button'
import { Paragraph } from '@/components/Typography'

export const Rewards: FC<{ builder: Address; gauge: Address }> = ({ builder, gauge }) => {
console.log('🚀 ~ gauge:', gauge)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remove it? or do we want to keep it for debugging purposes?

import { Address } from 'viem'
import { useReadContract } from 'wagmi'

export const useGetRewardShares = (gauge?: Address) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make the parameter required in the signature, otherwise it doesn't make sense for this function to exist.

Suggested change
export const useGetRewardShares = (gauge?: Address) => {
export const useGetRewardShares = (gauge: Address) => {

@@ -71,8 +71,8 @@ export const AllTimeRewards: FC<AllTimeRewardsProps> = ({ gauge, data: { rif, rb

useHandleErrors([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd combine these errors into one

error: rbtcError,
} = useGetRewardMetrics(gauge, rbtcRewards ?? 0n, totalPotentialRewardsValue, rbtc.symbol, currency)

useHandleErrors([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd combine these errors into one

@franciscotobar franciscotobar force-pushed the TOK-409/all-time-rewards branch from 8766ed7 to 7f0a332 Compare November 11, 2024 18:36
@franciscotobar franciscotobar force-pushed the TOK-408/estimated-rewards branch 3 times, most recently from 8fca78d to 07da9ed Compare November 11, 2024 19:22
@franciscotobar franciscotobar force-pushed the TOK-409/all-time-rewards branch from 7f0a332 to ec28fd6 Compare November 12, 2024 01:09
@franciscotobar franciscotobar force-pushed the TOK-408/estimated-rewards branch from 07da9ed to e2f9c69 Compare November 12, 2024 01:10
@jurajpiar jurajpiar force-pushed the TOK-409/all-time-rewards branch from ec28fd6 to bfabaef Compare November 12, 2024 09:46
@jurajpiar jurajpiar force-pushed the TOK-408/estimated-rewards branch from e2f9c69 to 1b628c5 Compare November 12, 2024 11:30
@jurajpiar jurajpiar force-pushed the TOK-408/estimated-rewards branch from 1b628c5 to 65e7d09 Compare November 12, 2024 11:32
@franciscotobar franciscotobar force-pushed the TOK-409/all-time-rewards branch 3 times, most recently from 2cf0de1 to 0d4951e Compare November 12, 2024 12:45
@antomor antomor changed the title feat(cr_v2): estimated rewards TOK-408: estimated rewards Nov 12, 2024
@franciscotobar franciscotobar changed the base branch from TOK-409/all-time-rewards to develop November 12, 2024 15:47
@franciscotobar franciscotobar force-pushed the TOK-408/estimated-rewards branch from 65e7d09 to 831531f Compare November 12, 2024 15:59
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link
Collaborator

@antomor antomor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antomor antomor merged commit bf7b947 into develop Nov 12, 2024
6 checks passed
@antomor antomor deleted the TOK-408/estimated-rewards branch November 12, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants