Skip to content

Commit

Permalink
Merge pull request #169 from bancorprotocol/168-bancor-v2-events-filt…
Browse files Browse the repository at this point in the history
…ering-issue

Update event filtering to remove Bancor V2 anchors
  • Loading branch information
mikewcasale authored Oct 13, 2023
2 parents e85a775 + f9b9772 commit e508f16
Show file tree
Hide file tree
Showing 6 changed files with 253 additions and 212 deletions.
8 changes: 4 additions & 4 deletions fastlane_bot/events/pools/bancor_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ def update_from_event(
self.state["tkn0_address"] == event_args["args"]["_token1"]
and self.state["tkn1_address"] == event_args["args"]["_token2"]
):
data["tkn0_balance"] = event_args["args"]["_rateN"]
data["tkn1_balance"] = event_args["args"]["_rateD"]
data["tkn0_balance"] = event_args["args"]["_rateD"]
data["tkn1_balance"] = event_args["args"]["_rateN"]
elif (
self.state["tkn0_address"] == event_args["args"]["_token2"]
and self.state["tkn1_address"] == event_args["args"]["_token1"]
):
data["tkn0_balance"] = event_args["args"]["_rateD"]
data["tkn1_balance"] = event_args["args"]["_rateN"]
data["tkn0_balance"] = event_args["args"]["_rateN"]
data["tkn1_balance"] = event_args["args"]["_rateD"]
else:
data["tkn0_balance"] = self.state["tkn0_balance"]
data["tkn1_balance"] = self.state["tkn1_balance"]
Expand Down
Loading

0 comments on commit e508f16

Please sign in to comment.