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

Move utility functions to utility services, minor bug fixes #495

Merged
merged 4 commits into from Jan 4, 2018

Conversation

Projects
None yet
3 participants
@Nasicus
Contributor

Nasicus commented Dec 31, 2017

  • Fixes harcoded 'Ark' and 'Ѧ' values (only seen by accident)
  • Move all Arktoshi calculations to utilityService and use the service everywhere
  • Remove networkService dependency from utilityService
  • Introduce constant for ark launch date
  • Move all ark relative date calculations to utility service
  • Improve all tests (instead of having to define ARKTOSHI_UNIT everytime, just inject our constants and use them if needed)

@j-a-m-l j-a-m-l self-requested a review Dec 31, 2017

@j-a-m-l

I'd rename UtilityService.getDate to UtilityService.getArkDate or similar.

@Nasicus

This comment has been minimized.

Show comment
Hide comment
@Nasicus

Nasicus Jan 1, 2018

Contributor

Hmm I find getArkDate also not optimal since a normal date is returned which has nothign to do with ark...however I thought of a better name - which would imho bi getDateFromArkStamp or getDateFromArkTimeStamp however, both of this names are so very long... so I just your proposition anyway.

Contributor

Nasicus commented Jan 1, 2018

Hmm I find getArkDate also not optimal since a normal date is returned which has nothign to do with ark...however I thought of a better name - which would imho bi getDateFromArkStamp or getDateFromArkTimeStamp however, both of this names are so very long... so I just your proposition anyway.

@j-a-m-l

This comment has been minimized.

Show comment
Hide comment
@j-a-m-l

j-a-m-l Jan 3, 2018

Member

@Nasicus what about these ideas: fromArkDate / dateFromArkDate arkStampToDate / arkToDate / fromArkToDate / fromArkToRealDate?

Member

j-a-m-l commented Jan 3, 2018

@Nasicus what about these ideas: fromArkDate / dateFromArkDate arkStampToDate / arkToDate / fromArkToDate / fromArkToRealDate?

@Nasicus

This comment has been minimized.

Show comment
Hide comment
@Nasicus

Nasicus Jan 3, 2018

Contributor

arkStampToDate => nice idea, renamed the opposite method to dateToArkStamp.
Thank you! 😎

Contributor

Nasicus commented Jan 3, 2018

arkStampToDate => nice idea, renamed the opposite method to dateToArkStamp.
Thank you! 😎

@j-a-m-l j-a-m-l merged commit e2d4f5e into ArkEcosystem:master Jan 4, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@j-a-m-l

This comment has been minimized.

Show comment
Hide comment
@j-a-m-l

j-a-m-l Jan 4, 2018

Member

+$10

Member

j-a-m-l commented Jan 4, 2018

+$10

@Nasicus Nasicus deleted the Nasicus:feat/utility-service-everywhere branch Jan 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment