Skip to content

Commit

Permalink
Merge pull request #30 from BeanstalkFarms/fix/sk/misc
Browse files Browse the repository at this point in the history
include unmigrated fert in bot display
  • Loading branch information
soilking authored Oct 11, 2024
2 parents ae6b36d + add5052 commit 470e9cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/data_access/subgraphs/beanstalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,18 @@ def get_pod_order(self, id):
return execute(self._client, query_str)["podOrder"]

def get_fertilizer_bought(self):
# Include Fertilizer from L1 which has not migrated yet
query_str = """
query {
fertilizers {
supply
unmigratedL1Supply
}
}
"""
# Create gql query and execute.
return float(execute(self._client, query_str)["fertilizers"][0]["supply"])
result = execute(self._client, query_str)
return float(result["fertilizers"][0]["supply"]) + float(result["fertilizers"][0]["unmigratedL1Supply"])

def get_start_stalk_by_season(self, season):
if season <= 1:
Expand Down

0 comments on commit 470e9cb

Please sign in to comment.