Skip to content

Conversation

@creed-victor
Copy link
Contributor

@creed-victor creed-victor self-assigned this Jan 20, 2026
@creed-victor creed-victor added the bug Something isn't working label Jan 20, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2026

🦋 Changeset detected

Latest commit: 5527c5c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
frontend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for sovryn-dapp ready!

Name Link
🔨 Latest commit 5527c5c
🔍 Latest deploy log https://app.netlify.com/projects/sovryn-dapp/deploys/696f4a071e46c40008462f3d
😎 Deploy Preview https://deploy-preview-1133.preview.sovryns.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for sovryn-storybook canceled.

Name Link
🔨 Latest commit 5527c5c
🔍 Latest deploy log https://app.netlify.com/projects/sovryn-storybook/deploys/696f4a0770724e00089bef25

@creed-victor creed-victor requested a review from Copilot January 20, 2026 09:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the AMM weekly rewards estimation calculation to use more accurate data sources and improves the implementation by migrating to React Query for better data fetching patterns.

Changes:

  • Refactored useGetReturnRate hook from useState/useEffect pattern to React Query
  • Updated useGetPoolBalanceAndRewards to calculate weekly rewards using actual return rates instead of a fixed constant
  • Added support for both V1 and V2 pool types with different calculation methods

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
apps/frontend/src/utils/graphql/rsk/operations/getToken.graphql Added symbol field to token query
apps/frontend/src/utils/graphql/rsk/generated.tsx Generated TypeScript types for the updated GraphQL query
apps/frontend/src/app/5_pages/MarketMakingPage/hooks/useGetReturnRate.ts Migrated from useState/useEffect to React Query pattern
apps/frontend/src/app/5_pages/MarketMakingPage/components/PoolsTable/components/PoolsTableReturns/PoolsTableReturns.tsx Updated to match new return signature of useGetReturnRate
apps/frontend/src/app/5_pages/MarketMakingPage/components/AdjustAndDepositModal/hooks/useGetPoolBalanceAndRewards.ts Refactored to use dynamic APY-based rewards calculation with support for V1/V2 pools
apps/frontend/src/app/5_pages/MarketMakingPage/components/AdjustAndDepositModal/components/NewPoolStatistics/NewPoolStatistics.tsx Updated function call to pass additional required parameters
.changeset/few-bugs-remember.md Added changeset documenting the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@creed-victor creed-victor merged commit a84ece0 into develop Jan 21, 2026
11 checks passed
@creed-victor creed-victor deleted the feat/SOV-5278-rsk-d-2-amm-btc-do-c-weekly branch January 21, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants