Skip to content

Commit

Permalink
Merge pull request #28 from gnosischain/dev
Browse files Browse the repository at this point in the history
API fix and Readme update
  • Loading branch information
ilge-ustun authored Mar 11, 2024
2 parents f7d153b + 463945a commit a0a90ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ python3 -m flask --app api run --port 8000

```
cd api
python3 -m unittest discover tests
python3 -m unittest discover -p 'test_*.py'
```

### Run Flake8 and isort
Expand Down
2 changes: 1 addition & 1 deletion api/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _ask(request_data, validate_captcha=True, access_key=None):
access_key=access_key)
ok = validator.validate()
if not ok:
return jsonify(message=validator.errors), validator.http_return_code
return jsonify(errors=validator.errors), validator.http_return_code

# convert amount to wei format
amount_wei = Web3.to_wei(validator.amount, 'ether')
Expand Down
1 change: 1 addition & 0 deletions api/tests/test_api_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_ask_route_parameters(self):
'tokenAddress': ERC20_TOKEN_ADDRESS
})
self.assertEqual(response.status_code, 429)
self.assertIn('errors', response.get_json().keys())


if __name__ == '__main__':
Expand Down

0 comments on commit a0a90ce

Please sign in to comment.