You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that this rounds down small decimal fractions for typical tokens with 18 decimals.
Example that was encountered by our community RSB provider Hymner while extending his service registration:
Actual token value required: 842.048535677596500000
Value displayed: 842
In this specific case that lead to too few tokens to be available in the wallet and the registration failing with the unintentionally hilarious message: You have 842 RDN but need 842 RDN.
Proposed solution
I'd argue that rounding is probably always the wrong thing to do here.
If at all then only rounding up would produce still inaccurate but at least not non-working results.
The text was updated successfully, but these errors were encountered:
Problem Definition
The
raiden_libs.service_registry
CLI utility uses this code to format token amounts:raiden-services/src/raiden_libs/service_registry.py
Lines 207 to 212 in d1d126e
The problem is that this rounds down small decimal fractions for typical tokens with 18 decimals.
Example that was encountered by our community RSB provider Hymner while extending his service registration:
Actual token value required:
842.048535677596500000
Value displayed:
842
In this specific case that lead to too few tokens to be available in the wallet and the registration failing with the unintentionally hilarious message:
You have 842 RDN but need 842 RDN.
Proposed solution
I'd argue that rounding is probably always the wrong thing to do here.
If at all then only rounding up would produce still inaccurate but at least not non-working results.
The text was updated successfully, but these errors were encountered: