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 report: GovClient.Proposals() doesn't properly parse request #365

Open
4 tasks done
dylanschultzie opened this issue Jun 23, 2023 · 0 comments
Open
4 tasks done

Comments

@dylanschultzie
Copy link

Prerequisites

Expected Behavior

Presumably proposals should be returned that fit the given status: https://github.com/fetchai/cosmpy/blob/main/tests/unit/test_gov/test_rest_client.py#L93

Current Behavior

Response: 400, b'{\n  "code": 3,\n  "message": "type mismatch, parameter: proposal_id, error: strconv.ParseUint: parsing \\"\\": invalid syntax",\n  "details": [\n  ]\n}')

To Reproduce

from cosmpy.common.rest_client import RestClient
from cosmpy.gov.rest_client import GovRestClient
from cosmpy.protos.cosmos.gov.v1beta1.query_pb2 import QueryProposalsRequest

gov_client = GovRestClient(RestClient(f"https://rest-fetchhub.fetch.ai"))    
request = QueryProposalsRequest()
request.proposal_status = 2
response = gov_client.Proposals(request)

Context

Cosmpy: v0.8.0
Python: v3.11

Failure Logs

No response

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