multiversx / mx-api-service

Unified REST API facade for providing data related to the MultiversX blockchain
https://api.multiversx.com
GNU General Public License v3.0
29 stars 46 forks source link

[Bug]: Potential minor bug on `/accounts/{address}/delegation` endpoint #1151

Open silvestrst-crypto opened 8 months ago

silvestrst-crypto commented 8 months ago

Contact Details

No response

Description

Potential minor bug on /accounts/{address}/delegation endpoint

Steps to reproduce

image

Field userUndelegatedList is marked as required, however, when the list is empty it seems that deserialization for that field is skipped: https://api.elrond.com/accounts//delegation

It might be that this issue was not hit before, but recently the response deserialization failed (rust serde) due to absence of the required field.

It's a very minor point, as the fix is simple on my side, but decided to flag it anyway.

On which network is the bug manifesting itself?

Mainnet

Relevant log output

error decoding response body: missing field `userUndelegatedList` at line 1 column 253


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
cfaur09 commented 8 months ago

Hi, thanks for reporting this, we will fix this issue :pray: