I see this as a bit too risky as a string representation of a number could contain thousands separator, a currency symbol, etc.
Maybe it should only receive a number as a parameter instead?
(edit: I see now that you have some logic about it in the truncateDecimals function)
Originally posted by @ascartabelli in dusk-network/rusk#3896 (comment)
I see this as a bit too risky as a string representation of a number could contain thousands separator, a currency symbol, etc.
Maybe it should only receive a number as a parameter instead?
(edit: I see now that you have some logic about it in the
truncateDecimalsfunction)Originally posted by @ascartabelli in dusk-network/rusk#3896 (comment)