Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: response types inconsistent #45

Closed
whoabuddy opened this issue Mar 4, 2022 · 1 comment
Closed

Bug: response types inconsistent #45

whoabuddy opened this issue Mar 4, 2022 · 1 comment

Comments

@whoabuddy
Copy link
Contributor

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.

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

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

@whoabuddy
Copy link
Contributor Author

Closing this out as SingleValue now accepts string | number | boolean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant