Skip to content

Conversation

@creed-victor
Copy link
Contributor

@creed-victor creed-victor requested a review from Copilot January 9, 2026 09:32
@creed-victor creed-victor self-assigned this Jan 9, 2026
@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: dc255c6

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

This PR includes changesets to release 2 packages
Name Type
frontend Patch
@sovryn/sdk 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 9, 2026

Deploy Preview for sovryn-storybook canceled.

Name Link
🔨 Latest commit dc255c6
🔍 Latest deploy log https://app.netlify.com/projects/sovryn-storybook/deploys/69649a23429859000886a5fa

@netlify
Copy link

netlify bot commented Jan 9, 2026

Deploy Preview for sovryn-dapp ready!

Name Link
🔨 Latest commit dc255c6
🔍 Latest deploy log https://app.netlify.com/projects/sovryn-dapp/deploys/69649a2376228200081e22ce
😎 Deploy Preview https://deploy-preview-1132.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.

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 fixes issues with the BOB money market by refactoring how spot prices and position balances are calculated. The changes address calculation inconsistencies and remove redundant logic for handling LP token balances.

Key changes:

  • Replaced dynamic spot price queries with static price values from pool metadata
  • Removed duplicate LP token balance handling logic from position queries
  • Added extra field serialization to Pool class

Reviewed changes

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

Show a summary per file
File Description
packages/sdk/src/indexer/pools/pool.ts Added serialization of extra field in Pool's serialize() method
apps/frontend/src/app/5_pages/MarketMakingPage/components/BobWIthdrawModal/BobWithdrawModal.tsx Refactored to use static display price and updated position with LP token balance instead of querying wallet
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/hooks/useGetPositionsTotalBalance.ts Replaced usePoolSpotPrice hook with static price calculation from pool metadata
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/hooks/useGetAmbientPositions.ts Removed complex LP token balance handling logic and wallet queries
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/components/AmbientPoolPositions/hooks/usePoolSpotPrice.ts Deleted entire file as spot price queries are no longer needed
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/components/AmbientPoolPositions/hooks/useAmbientPositionBalance.ts Replaced usePoolSpotPrice with static price calculation, added optional priceOverride parameter
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/components/AmbientPoolPositions/components/AmbientPositionBalance/AmbientPositionBalance.tsx Added priceOverride prop and simplified by removing token detail lookups
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/components/AmbientPoolPositions/AmbientPoolPositions.utils.ts Added validation to check if spotPrice is finite
apps/frontend/src/app/5_pages/MarketMakingPage/components/AmbientMarketMaking/AmbientMarketMaking.tsx Updated query key for better cache specificity

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

@creed-victor creed-victor merged commit a249f19 into develop Jan 12, 2026
9 of 11 checks passed
@creed-victor creed-victor deleted the fix/extensive-rpc-calls branch January 12, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants