Skip to content

ContractDelegate Incorrectly Errors When No Delegate Is Set #187

Description

@utdrmac

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions