Closed whoabuddy closed 2 years ago
This is one I'm surprised we didn't catch earlier.
All SingleValue entries are passed to the response as either string | boolean. These can be numbers, too, and the docs are not consistent with the endpoints.
SingleValue
string | boolean
Shows it returns a number: https://api.citycoins.co/docs#tag/Mining/paths/~1mining~1get-block-winner-id~1{cityname}~1{blockheight}/get
Actually returns a string: {"value":"407"} https://api.citycoins.co/mining/get-block-winner-id/mia/49000
{"value":"407"}
I think it's something with how we're using micro-stacks as the Stacks block height endpoint returns a number: https://api.citycoins.co/stacks/get-block-height
This will be interesting to look at alongside #40
Closing this out as SingleValue now accepts string | number | boolean
string | number | boolean
This is one I'm surprised we didn't catch earlier.
All
SingleValue
entries are passed to the response as eitherstring | boolean
. These can be numbers, too, and the docs are not consistent with the endpoints.Shows it returns a number: https://api.citycoins.co/docs#tag/Mining/paths/~1mining~1get-block-winner-id~1{cityname}~1{blockheight}/get
Actually returns a string:
{"value":"407"}
https://api.citycoins.co/mining/get-block-winner-id/mia/49000I think it's something with how we're using micro-stacks as the Stacks block height endpoint returns a number: https://api.citycoins.co/stacks/get-block-height
This will be interesting to look at alongside #40