mirror of https://github.com/nucypher/nucypher.git
Sort list of chain ids returned by `/condition_chains` node endpoint.
Update test.pull/3576/head
parent
846cd931c7
commit
75e49a603f
|
@ -154,8 +154,9 @@ def _make_rest_app(this_node, log: Logger) -> Flask:
|
|||
"""
|
||||
# TODO: When non-evm chains are supported, bump the version.
|
||||
# this can return a list of chain names or other verifiable identifiers.
|
||||
|
||||
payload = {"version": 1.0, "evm": list(this_node.condition_providers.providers)}
|
||||
providers = this_node.condition_providers.providers
|
||||
sorted_chain_ids = sorted(list(providers))
|
||||
payload = {"version": 1.0, "evm": sorted_chain_ids}
|
||||
return Response(json.dumps(payload), mimetype="application/json")
|
||||
|
||||
@rest_app.route('/decrypt', methods=["POST"])
|
||||
|
|
|
@ -18,5 +18,5 @@ def test_condition_chains_endpoint_multichain(
|
|||
):
|
||||
response = client.get("/condition_chains")
|
||||
assert response.status_code == 200
|
||||
expected_payload = {"version": 1.0, "evm": multichain_ids}
|
||||
expected_payload = {"version": 1.0, "evm": sorted(multichain_ids)}
|
||||
assert response.get_json() == expected_payload
|
||||
|
|
Loading…
Reference in New Issue