Skip to content

Commit

Permalink
Merge pull request #55 from cowprotocol/fix_metadata_bug
Browse files Browse the repository at this point in the history
Fix metadata issue
  • Loading branch information
harisang authored Sep 7, 2024
2 parents 360960e + 10f4238 commit b356e66
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/fees/compute_fees.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,12 @@ def get_all_data(self, tx_hash: HexBytes) -> SettlementData:
fee_policies = self.parse_fee_policies(trade_data["feePolicies"])

app_data = json.loads(order_data["fullAppData"])
if "partnerFee" in app_data["metadata"].keys():
partner_fee_recipient = Web3.to_checksum_address(
HexBytes(app_data["metadata"]["partnerFee"]["recipient"])
)
else:
partner_fee_recipient = NULL_ADDRESS
partner_fee_recipient = NULL_ADDRESS
if "metadata" in app_data.keys():
if "partnerFee" in app_data["metadata"].keys():
partner_fee_recipient = Web3.to_checksum_address(
HexBytes(app_data["metadata"]["partnerFee"]["recipient"])
)

trade = Trade(
order_uid=uid,
Expand Down

0 comments on commit b356e66

Please sign in to comment.