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

dApp: Deposit limit when TVL cap is exceeded #826

Merged
merged 9 commits into from
Nov 8, 2024

Conversation

kpyszkowski
Copy link
Contributor

@kpyszkowski kpyszkowski commented Nov 4, 2024

Closes: #827
Closes: #805

Changes:

  • Add information about the TVL cap excess
  • Add information about the remaining TVL
  • Disable the deposit button when the TVL cap is exceeded
  • Hide the withdrawal button for guests and first time users

Preview:

image image

Note:

  • To start with latest TVL changes I set the origin branch to tvl-component.
  • If you'd like to test the functionality you can manually modify the cap value in src/constants/staking.ts file.

Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for acre-dapp ready!

Name Link
🔨 Latest commit 5ce853f
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp/deploys/672cdc021b10db00089bcdfe
😎 Deploy Preview https://deploy-preview-826--acre-dapp.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 site configuration.

Copy link

netlify bot commented Nov 4, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 5ce853f
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/672cdc0237c1740008a6afe3
😎 Deploy Preview https://deploy-preview-826--acre-dapp-testnet.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 site configuration.

@kpyszkowski kpyszkowski changed the base branch from main to tvl-component November 4, 2024 13:46
@kpyszkowski kpyszkowski marked this pull request as draft November 4, 2024 13:59
@kpyszkowski kpyszkowski marked this pull request as ready for review November 4, 2024 15:26
@kpyszkowski kpyszkowski linked an issue Nov 4, 2024 that may be closed by this pull request
@kpyszkowski kpyszkowski linked an issue Nov 4, 2024 that may be closed by this pull request
@kpyszkowski kpyszkowski marked this pull request as draft November 4, 2024 15:27
@kpyszkowski kpyszkowski marked this pull request as ready for review November 4, 2024 16:37
@kpyszkowski kpyszkowski marked this pull request as draft November 5, 2024 11:29
@kpyszkowski kpyszkowski marked this pull request as ready for review November 5, 2024 16:18
@nkuba nkuba added this to the Ledger Live Launch milestone Nov 6, 2024
dapp/src/pages/DashboardPage/PositionDetails.tsx Outdated Show resolved Hide resolved
dapp/src/pages/DashboardPage/PositionDetails.tsx Outdated Show resolved Hide resolved
dapp/src/hooks/useStatistics.ts Outdated Show resolved Hide resolved
Base automatically changed from tvl-component to main November 6, 2024 23:26
Copy link
Contributor

@kkosiorowska kkosiorowska left a comment

Choose a reason for hiding this comment

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

LGTM, I left only one question and non-blocking comment.

  • When the flag is disabled and the user is not connected, we do not display the withdraw button. Currently we always display two buttons. Are we sure we want to change it?
Screenshot 2024-11-07 at 14 29 34
  • I think we could improve a bit the loading of elements in the following component. What I mean is that when the user is not connected can see a button and text then later the text disappears and two buttons appear. I think we could add maybe a skeleton for all this row? Of course, this is a non-blocking comment, let's think about it later.
Screen.Recording.2024-11-07.at.14.30.20.mov

@kpyszkowski
Copy link
Contributor Author

@kkosiorowska

When the flag is disabled and the user is not connected, we do not display the withdraw button. Currently we always display two buttons. Are we sure we want to change it?

It was consulted with Design team and it was confirmed that the Withdrawal button should be hidden under specific conditions. (context)

I think we could add maybe a skeleton for all this row?

I considered it. The purpose of skeletons is to provide a placeholder for content that is not ready yet.
Both the TVL and cap amount are ready as long as user enters the dApp so the skeleton seems pointless here.
I'd ask Design team for an opinion in this matter.

@nkuba
Copy link
Member

nkuba commented Nov 8, 2024

@kpyszkowski does this PR address #805?

@kkosiorowska kkosiorowska merged commit d39606e into main Nov 8, 2024
28 checks passed
@kkosiorowska kkosiorowska deleted the tvl-cap-deposit-limit branch November 8, 2024 10:53
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.

Deposit limit when TVL cap is exceeded [TVL] Display "Remaining Until Deposit Cap" Next to Deposit Button
3 participants