Skip to content

Conversation

@creed-victor
Copy link
Contributor

@creed-victor creed-victor self-assigned this Dec 16, 2025
@creed-victor creed-victor added the enhancement New feature or request label Dec 16, 2025
Copilot AI review requested due to automatic review settings December 16, 2025 08:43
@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for sovryn-layer ready!

Name Link
🔨 Latest commit 922a9d9
🔍 Latest deploy log https://app.netlify.com/projects/sovryn-layer/deploys/694156aff2e9f20008f1e6ba
😎 Deploy Preview https://deploy-preview-20--sovryn-layer.netlify.app
📱 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
Contributor

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 implements the ability for users to withdraw their supplied assets from the money market. The implementation includes a new withdraw dialog UI component, backend SDK support for withdrawal transactions, and necessary utility functions for amount calculations.

Key changes:

  • Added withdraw method to MoneyMarketManager SDK to handle withdrawal transactions for both native and non-native assets
  • Created WithdrawDialog component with form validation and maximum withdrawal calculation based on health factor requirements
  • Introduced shared utilities including a isFullAmount helper and MINIMUM_HEALTH_FACTOR constant

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/shared/src/lib/decimal.ts Added MAX_UINT_256 constant to Decimal class for handling maximum withdrawal amounts
packages/sdk/src/managers/money-market/money-market.manager.ts Implemented withdraw method with ABI definitions for withdraw and withdrawETH functions
apps/web-app/src/routes/money-market.tsx Integrated WithdrawDialog component into the money market route
apps/web-app/src/lib/utils.ts Added isFullAmount utility function for threshold-based amount comparisons
apps/web-app/src/components/ui/health-factor-bar.tsx Updated to use shared MINIMUM_HEALTH_FACTOR constant
apps/web-app/src/components/MoneyMarket/stores/withdraw-request.store.ts Created zustand store for managing withdrawal dialog state
apps/web-app/src/components/MoneyMarket/constants.ts Defined MINIMUM_HEALTH_FACTOR constant (1.1)
apps/web-app/src/components/MoneyMarket/components/WithdrawDialog/WithdrawDialog.tsx Implemented withdrawal dialog with form, validation, and health factor calculations
apps/web-app/src/components/MoneyMarket/components/LendPositionsList/components/AssetsTable/AssetsTable.tsx Added withdraw button functionality to supply positions table
apps/web-app/src/components/MoneyMarket/components/LendDialog/LendDialog.tsx Updated dialog description to be more descriptive
apps/web-app/src/components/MoneyMarket/components/BorrowDialog/BorrowDialog.tsx Refactored to use shared MINIMUM_HEALTH_FACTOR constant

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

Copilot AI review requested due to automatic review settings December 16, 2025 12:55
Copy link
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.


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

@creed-victor creed-victor merged commit 34c351b into develop Dec 16, 2025
5 of 6 checks passed
@creed-victor creed-victor deleted the feat/SOV-5270-as-an-user-i-want-to-withdraw branch December 16, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants