cowprotocol / token-imbalances

2 stars 0 forks source link

Fix metadata issue #55

Closed harisang closed 2 months ago

harisang commented 2 months ago

The code assumes that there is always a "metadata" key in the appdata dictionary. This is not always the case; see e.g, this order. In such cases, the script produces an error

    if "partnerFee" in app_data["metadata"].keys():
                       ~~~~~~~~^^^^^^^^^^^^
KeyError: 'metadata'

This PR addresses this.