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

Fix(staking): display stake statuses & exit & claim "values" #4249

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

compojoom
Copy link
Collaborator

@compojoom compojoom commented Sep 25, 2024

What it solves

  • Incorrect Withdrawal Request Status
  • Mismatch in Deposit Validator Status
  • Incorrect Claim Transaction Value in History
  • Time Formatting Errors: Updated time formatting functions to correctly handle milliseconds, as the gateway now returns time in milliseconds instead of seconds.
  • Validator Exit Details Enhancement: Improved the display of validator exit information by showing validator amounts and adding links to beacon chain explorers for better user visibility.

How this PR fixes it

  • Status Display Corrections:
    Updated the StakingStatus component to correctly map staking statuses to their corresponding display texts and icons.
    Modified status labels in the Deposit and Exit components to accurately reflect the validator’s status.

  • Time Formatting Updates:
    Changed time formatting functions from handling seconds to milliseconds by updating formatDurationFromSeconds to formatDurationFromMilliseconds.

  • Validator Exit Information:
    Refactored StakingTxExitDetails to display validator number instead of transaction values when exiting a validator.
    Added links to beacon chain explorers in the exit details for users to monitor validator statuses externally.

How to test it

Screenshots

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

github-actions bot commented Sep 25, 2024

Copy link

github-actions bot commented Sep 25, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.1% (-0.03% 🔻)
11998/15363
🔴 Branches
58.21% (-0.03% 🔻)
3084/5298
🟡 Functions
65.09% (-0.04% 🔻)
1889/2902
🟡 Lines
79.64% (+0% 🔼)
10829/13598
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / constants.ts
50% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / DataRow.tsx
80% (-3.33% 🔻)
0% (-66.67% 🔻)
100% 100%
🟢
... / index.tsx
66.67% (-8.33% 🔻)
0% (-100% 🔻)
0% 100%
🟢
... / index.tsx
71.43% (-8.57% 🔻)
0% 0%
83.33% (-5.56% 🔻)

Test suite run success

1484 tests passing in 203 suites.

Report generated by 🧪jest coverage report action from e7e6ab7

@compojoom compojoom marked this pull request as ready for review September 26, 2024 15:17
@compojoom compojoom changed the title Fix stake statuses Fix(staking): display stake statuses & exit & claim "values" Sep 26, 2024
Copy link

github-actions bot commented Sep 26, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 954.79 KB (🟡 +167 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Revert "fix: small UI discrepancies with the figma designs"

This reverts commit 1efbf952c130cdfa856988952ed1489fe079626a.
The gateway now returns the time in milliseconds.
Instead of displaying the value for exiting a validator, we now display
the validator amount that we are exiting.
@compojoom compojoom merged commit d769925 into dev Sep 27, 2024
15 checks passed
@compojoom compojoom deleted the fix-stake-statuses branch September 27, 2024 08:21
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants