You are viewing a single comment's thread from:

RE: Steem-engine.com: Bugfix and Mobile Optimization

in #utopian-io5 years ago (edited)

Thank you for your contribution.

  1. using !important may be a code smell. https://css-tricks.com/when-using-important-is-the-right-choice/
  2. it is good to know that .toFixed() has round-up, which reminds me to fix my wallet tool as well. You might unit-tests (or even TDD) this function.
  3. the (3.1).toFixed(3) will return "3.100" but your function will return "3.1"

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Sort:  

the (3.1).toFixed(3) will return "3.100" but your function will return "3.1"

That's indeed true. Don't tell me that this is a Problem for the APIs... :/

The !important is of course just because all of this will be obsolete one the new UI is ready. So I was just hotfixing. ;)

I think if you are using steem-js, you have to explicitly set 3 decimal places otherwise the API call will fail i.e. that is why I added .toFixed(3) in the first place.

Hmmmm ok. Then this should be fixed asap. I'm now on a plane. So... Maybe you wanna.... :D

Super! This is definitely more robust. But I have to say that I was a bit confused at first because I thought my solution is solid enough. I don't know if there's a possibility for something like 3.1. I only thought about numbers with more than 3 digits.

Thank you for your review, @justyy! Keep up the good work!

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.031
BTC 68548.71
ETH 3847.93
USDT 1.00
SBD 3.73