Skip to content

Commit

Permalink
Merge pull request #18 from BeanstalkFarms/sk/fix/pod-order
Browse files Browse the repository at this point in the history
Update pod order to not use podAmount from subgraph
  • Loading branch information
soilking authored Jul 15, 2024
2 parents 8788669 + ce0ad5f commit 9d30f00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions bots/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1431,9 +1431,7 @@ def farmers_market_str(self, event_log, transaction_receipt):
f"Ignoring null order cancel with graph id {order_id} and txn hash {event_log.transactionHash.hex()}"
)
return ""
pod_amount = pods_to_float(
int(pod_order["podAmount"]) - int(pod_order["podAmountFilled"])
)
pod_amount = (float(pod_order["beanAmount"]) - float(pod_order["beanAmountFilled"])) / float(pod_order["pricePerPod"])
max_place = pods_to_float(pod_order["maxPlaceInLine"])
price_per_pod = bean_to_float(pod_order["pricePerPod"])
event_str += f"❌ Pod Order Cancelled"
Expand Down
3 changes: 2 additions & 1 deletion data_access/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def get_pod_order(self, id):
maxPlaceInLine
id
pricePerPod
podAmount
beanAmount
beanAmountFilled
podAmountFilled
}}
}}
Expand Down

0 comments on commit 9d30f00

Please sign in to comment.