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

feat: seconds to duration #467

Merged
merged 8 commits into from
Nov 14, 2023
Merged

feat: seconds to duration #467

merged 8 commits into from
Nov 14, 2023

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Nov 14, 2023

Motivation

We use the secondsToDuration we have built for NNS dapp also in other apps such as Oisy Wallet and VRC.
Therefore it makes sense to move the function to the utils.

Changes

  • move secondsToDuration (no functional changes, just move)
  • adapt it to accept a record of languages to support i18n
  • default to english

@peterpeterparker peterpeterparker added the enhancement New feature or request label Nov 14, 2023
Copy link
Contributor

github-actions bot commented Nov 14, 2023

size-limit report 📦

Path Size
@dfinity/ckbtc 6.79 KB (0%)
@dfinity/cmc 1.01 KB (0%)
@dfinity/ledger-icrc 2.92 KB (0%)
@dfinity/ledger-icp 14.41 KB (0%)
@dfinity/nns 33.81 KB (0%)
@dfinity/nns-proto 76.3 KB (0%)
@dfinity/sns 14.91 KB (0%)
@dfinity/utils 4.12 KB (+8.26% 🔺)
@dfinity/ic-management 1.94 KB (0%)

Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@peterpeterparker peterpeterparker merged commit e9cf929 into main Nov 14, 2023
9 checks passed
@peterpeterparker peterpeterparker deleted the feat/seconds-to-duration branch November 14, 2023 13:46
github-merge-queue bot pushed a commit to dfinity/nns-dapp that referenced this pull request Nov 16, 2023
# Motivation

`secondsToDuration` has been moved to `@dfinity/utils` therefore this PR
replaces the usage of the function by the one in the library. It also
remove the duplicate implementation within NNS dapp which becomes
unused.

# PRs

- [x] Function moved in dfinity/ic-js#467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants