-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dApp: Implement total Acre Points pool balance (#841)
Closes: #804 Ref: thesis/acre-bots#51 This pull request introduces several enhancements to the Acre Points feature, including the addition of a total pool balance, periodic data refetching, and improved user interface elements. ### Changes * [`dapp/src/hooks/useAcrePoints.ts`](diffhunk://#diff-50509a2a9c5c760f8862e203441b351818ef1a74dcda1d67bd182dc28b8abafeL3-R3): Added `totalPoolBalance` to the return type of `useAcrePoints` and included a periodic data refetch interval using `REFETCH_INTERVAL_IN_MILLISECONDS`. * [`dapp/src/pages/DashboardPage/AcrePointsCard.tsx`](diffhunk://#diff-fa83f2c138fd549157e83bc1a2f0febde516a577e3ac3d3a4680ac1084ae7acdR33-R41): Updated `AcrePointsCard` to display the total pool balance when the wallet is disconnected and modified the tooltip to provide context-sensitive information. * [`dapp/src/utils/acreApi.ts`](diffhunk://#diff-0d8a6f1ae9db41b7ed6c24c22ae775fe1bf0f6c4c56ddcacf0aba716c2400becR40): Modified `getPointsData` to include `totalPool` in the response. ### Preview <img width="719" alt="image" src="https://github.com/user-attachments/assets/4b850f08-a946-4baa-9da2-f3ce0af057bb"> <img width="719" alt="image" src="https://github.com/user-attachments/assets/7a7c0c38-b727-46d5-bd83-c615a80666eb">
- Loading branch information
Showing
3 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters