-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: human readable locktime duration for fidelity bonds #450
Merged
Conversation
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
ghost
requested a review
from theborakompanioni
August 4, 2022 16:58
ghost
self-assigned this
Aug 4, 2022
cc @ABHISHEK-PANDEY2 ☝️ |
ghost
changed the title
feat: human readable locktime duration for fidality bonds
feat: human readable locktime duration for fidelity bonds
Aug 4, 2022
Co-authored-by: Thebora Kompanioni <[email protected]>
Co-authored-by: Thebora Kompanioni <[email protected]>
Co-authored-by: Thebora Kompanioni <[email protected]>
Co-authored-by: Thebora Kompanioni <[email protected]>
Nice! Only thing missing is passing the Something like: const { i18n } = useTranslation()
[...]
fb.time.humanReadableDuration({ [...], locale: i18n.resolvedLanguage || i18n.language }) But maybe there is a better way? |
…-webui into fb-time-util
Co-authored-by: Thebora Kompanioni <[email protected]>
theborakompanioni
approved these changes
Aug 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ 💪
ghost
deleted the
fb-time-util
branch
August 5, 2022 10:28
ghost
mentioned this pull request
Aug 5, 2022
Merged
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #397.
Mostly used existing code from the old fidelity bond branch. 👴
Moved out the time interval computation to an extra function but I don't really like it anymore since it gets super long at the call site.Also added a small addition to make sure to loop over the time units in the correct order, since it's not so clear if looping overObject.keys()
always guarantees the order. So I figured manually sorting wouldn't hurt.The tests are the same as on the old branch. I hope it works like this
--might refactor thefb.time
API tomorrow to make callsites a bit cleaner. 🧹📸