-
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.
Show estimated duration for new transactions (#697)
Closes #684 This PR adds the estimated duration for new transactions. All transactions will be displayed in the history table. However, notifications will only show completed ones and the list of activity notifications will be shown at the top. #### What has been done: - Displayed the estimated duration in the staking and unstaking tiles. - Implemented the UI changes in the middle column components (pending transactions, position, transactions history). - Fixed activity sorting in the history table. - 362c27e - Added custom styles for a symbol in the `CurrencyBalance` component. -32fe952 - Added additional dots for the `CurrencyBalance` component. - d62c97d During the implementation of the UI changes for the middle column, the padding was changed. This change also affected the pagination buttons for the activity table. These components should be separate and should not affect each other. In addition, it was noted that when we add some new element under the `PaginationPage` or `Pagination` tag, the list of activities will overlap it when we switch pages. For this purpose, the `PaginationFooter` component was created as a temporary solution. We should resolve this in a separate PR. Created an issue - #705 ### UI <img width="500" alt="Screenshot 2024-08-14 at 12 13 43" src="https://github.com/user-attachments/assets/95033693-1580-4ac8-a948-2976973e40cb"> <img width="500" alt="Screenshot 2024-08-14 at 13 51 24" src="https://github.com/user-attachments/assets/339189b6-6271-4177-bebc-43e84105e2b8"> ### Testing Make sure we display the correct estimated duration: - Staking - [x] < 0.1 BTC ~1 hour - [x] >= 0.1 BTC < 1 BTC ~2 hours - [x] >= 1 BTC ~3 hours - Unstaking - [ ] We display 6 hours, regardless of the amount.
- Loading branch information
Showing
24 changed files
with
327 additions
and
200 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
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
28 changes: 28 additions & 0 deletions
28
dapp/src/components/shared/Pagination/PaginationFooter.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from "react" | ||
import { HStack, StackProps } from "@chakra-ui/react" | ||
|
||
const TOP_SPACE = 6 | ||
|
||
type PaginationFooterProps = StackProps & { containerPadding: number } | ||
|
||
function PaginationFooter(props: PaginationFooterProps) { | ||
const { children, containerPadding, ...restProps } = props | ||
|
||
return ( | ||
<HStack | ||
mx={-containerPadding} | ||
mb={-containerPadding} | ||
px={containerPadding} | ||
pb={containerPadding} | ||
mt={-TOP_SPACE} | ||
pt={TOP_SPACE} | ||
bgGradient="linear(to-b, transparent, gold.200 20%)" | ||
zIndex={2} | ||
{...restProps} | ||
> | ||
{children} | ||
</HStack> | ||
) | ||
} | ||
|
||
export default PaginationFooter |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { selectActivities } from "#/store/wallet" | ||
import { useAppSelector } from "./useAppSelector" | ||
|
||
export default function useActivities() { | ||
return useAppSelector(selectActivities) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { selectLatestCompletedActivities } from "#/store/wallet" | ||
import { useAppSelector } from "./useAppSelector" | ||
|
||
export default function useLatestCompletedActivities() { | ||
return useAppSelector(selectLatestCompletedActivities) | ||
} |
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
Oops, something went wrong.