stellar / django-polaris

An extendable Django app for building modular Stellar services
https://django-polaris.readthedocs.io
Apache License 2.0
94 stars 66 forks source link

feeTable commas #707

Open yuriescl opened 8 months ago

yuriescl commented 8 months ago

In SEP-24 transaction form, there's a syntax error being raised due to a comma in the values:

image

image

This is where the value is getting rendered: https://github.com/stellar/django-polaris/blob/2ac9a012d2c111b70345b136148dcfd19b21f2f6/polaris/templates/polaris/base.html#L78

The fix is likely to adjust how the value gets rendered and remove the comma.

yuriescl commented 8 months ago

I was able to resolve by setting settings.USE_THOUSAND_SEPARATOR to False: https://docs.djangoproject.com/en/3.2/ref/settings/#use-thousand-separator

But Polaris should not use commas by default even if settings.USE_THOUSAND_SEPARATOR is True, otherwise will break the JavaScript syntax.