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

ContractDelegate Incorrectly Errors When No Delegate Is Set #187

Open
utdrmac opened this issue Apr 18, 2021 · 0 comments
Open

ContractDelegate Incorrectly Errors When No Delegate Is Set #187

utdrmac opened this issue Apr 18, 2021 · 0 comments

Comments

@utdrmac
Copy link
Contributor

utdrmac commented Apr 18, 2021

Use rpc.ContractDelegate() to fetch the delegate address of a delegator, or baker (to check if baker is registered to bake). In the case of no baker set, or not registered to bake, the RPC context/contracts/%s/delegate returns 404. The JSON Unmarshal attempts to unmarshal a non-existent response body which fails as error.

This is a false-negative and the function overall should succeed and return "" when no delegate is set.

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