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

Erro toFixed() in coin wrappers scripts #90

Closed
Lavyk opened this issue Apr 10, 2021 · 2 comments · Fixed by #77
Closed

Erro toFixed() in coin wrappers scripts #90

Lavyk opened this issue Apr 10, 2021 · 2 comments · Fixed by #77
Labels
bug Something isn't working

Comments

@Lavyk
Copy link

Lavyk commented Apr 10, 2021

Description

When I add symbols that involve the FIAT BRL the following error appears in several files that contain toFixed(precision):

"Uncaught RangeError: toFixed() digits argument must be between 0 and 100."

Note that when we add the symbols, an "precision" is -1

To Reproduce

To produce the error, I just added the symbols BTCBRL, ETHBRL and BNBBRL.

Solution found

The solution I found was to add "Math.abs()", for example:

{(+baseAssetBalance.free).toFixed(Math.abs(precision))}

I don't know if it interferes with anything, could someone help me in this correction?

Additional context

Sorry my english, I'm using google translator.

@Lavyk Lavyk added the bug Something isn't working label Apr 10, 2021
@chrisleekr
Copy link
Owner

@Lavyk Thank you for reporting the bug.

I replicated, let me see what I can do.

@chrisleekr
Copy link
Owner

@Lavyk The issue has been resolved in the PR, which will be merged later.
If you want to use BTCBRL, then please use this PR - #77

image

@chrisleekr chrisleekr mentioned this issue Apr 19, 2021
chrisleekr added a commit that referenced this issue May 21, 2021
…ements (#77)

- Updated frontend to display version - #59
- Support monitoring multiple coins simultaneously - #77
- Added docker-stack.yml for the Portainer - @hipposen
- Fixed precision issues for some FIAT - #90
- Improved frontend & settings UI - #93 #85
- Support all symbols - #104
- Added stop loss feature - #99
- Stabilised Local Tunnel, cronjob and Binance WebSocket
- Prevented to place new order when the API limit reached - #163
- Added NPM task for building docker image on Windows by @garyng - #175

Co-authored-by: GaryNg <garyng.zhongbo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants