cowprotocol/ebbo

Fix cost coverage test for zero signed fees

Closed this issue · 0 comments

The test for cost coverage of zero-signed fees errors sometimes on the line

and full_appdata["metadata"]["orderClass"]["orderClass"] == "market"

with a KeyError: 'orderClass'.

App data can be very general so we need to make sure that we do not access a field that does not exist. Using a try ... except construct and skipping the test in case app data is not of the expected form should work.