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

Display estimated debonding time in debonding list #963

Merged
merged 2 commits into from
Aug 10, 2022

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Aug 9, 2022

Related to #420

Before After
1 2

@github-actions
Copy link

github-actions bot commented Aug 9, 2022

MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 5 0 0.02s
✅ GIT git_diff yes no 0.01s
✅ JSON eslint-plugin-jsonc 1 0 0 0.95s
✅ JSON jsonlint 1 0 0.25s
✅ JSON prettier 1 0 0 0.53s
✅ JSON v8r 1 0 1.32s
✅ TSX eslint 3 0 0 5.87s

See errors details in artifact MegaLinter reports on CI Job page
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #963 (38ec1b6) into master (baefdcd) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #963      +/-   ##
==========================================
+ Coverage   88.50%   88.58%   +0.07%     
==========================================
  Files          98       99       +1     
  Lines        1697     1708      +11     
  Branches      392      396       +4     
==========================================
+ Hits         1502     1513      +11     
  Misses        195      195              
Flag Coverage Δ
cypress 58.12% <15.38%> (-0.27%) ⬇️
jest 79.41% <100.00%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/components/TimeToEpoch/index.tsx 100.00% <100.00%> (ø)
...ages/StakingPage/Features/DelegationList/index.tsx 85.36% <100.00%> (+0.75%) ⬆️


const estimatedEpochsPerHour = 1

const relativeFormat = new Intl.RelativeTimeFormat(process?.env?.NODE_ENV === 'test' ? 'en-US' : undefined)
Copy link
Contributor

Choose a reason for hiding this comment

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

The downside is that we loose multi lang support. It will show EN labels no matter what lang user is using.

Copy link
Member Author

Choose a reason for hiding this comment

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

in production new Intl.RelativeTimeFormat(undefined).format(1, 'day') it should be localized:
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Either way it's not in sync with app lang. Mixing langs is a bit weird, but in this case it is still better than epoch number.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a very good point 😓
created #965

@lukaw3d lukaw3d merged commit a30f319 into master Aug 10, 2022
@lukaw3d lukaw3d deleted the lw/readable-debonding branch August 10, 2022 17:33
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.

None yet

2 participants