Create a contentId with a price of 1 and currency of SEK (should work with any currency, but that was what I tested with)
GET /content/:the-content-id
See how the satoshi amount is right, and the currency is right, but there is no label of the 1 number. So it would be rendered as
Solution
While keeping the satoshi field, we should also have a price field which shows the price in the chosen currency. Only used for the UI, but important nontheless.
The price field need to be a string, because it need to be formatted properly. We should format it based on the Accept-Language-http header in the http request. For instance, in German and Swedish numbers are written like 5,32 while in English they are 5.32. Wish everyone could just agree on one system though...
How to reproduce
1
and currency ofSEK
(should work with any currency, but that was what I tested with)GET /content/:the-content-id
1
number. So it would be rendered asSolution
satoshi
field, we should also have aprice
field which shows the price in the chosen currency. Only used for the UI, but important nontheless.price
field need to be a string, because it need to be formatted properly. We should format it based on theAccept-Language
-http header in the http request. For instance, in German and Swedish numbers are written like5,32
while in English they are5.32
. Wish everyone could just agree on one system though...