diff --git a/src/tzkt/tzkt_reward_api.py b/src/tzkt/tzkt_reward_api.py index d720d047..9872a1a6 100644 --- a/src/tzkt/tzkt_reward_api.py +++ b/src/tzkt/tzkt_reward_api.py @@ -27,7 +27,7 @@ def get_rewards_for_cycle_map(self, cycle, rewards_type) -> RewardProviderModel: address=self.baking_address, cycle=cycle, fetch_delegators=True ) - delegate_staking_balance = split["stakingBalance"] + delegate_staking_balance = split["delegatedBalance"] # calculate estimated rewards num_blocks = split["blocks"] + split["missedBlocks"] + split["futureBlocks"] @@ -46,7 +46,6 @@ def get_rewards_for_cycle_map(self, cycle, rewards_type) -> RewardProviderModel: rewards_and_fees = ( split["blockRewards"] + split["endorsementRewards"] - + split["blockFees"] + split["revelationRewards"] ) denunciation_rewards = ( @@ -72,8 +71,8 @@ def get_rewards_for_cycle_map(self, cycle, rewards_type) -> RewardProviderModel: delegators_balances = { item["address"]: { - "staking_balance": item["balance"], - "current_balance": item["currentBalance"], + "staking_balance": item["delegatedBalance"], + "current_balance": item["currentDelegatedBalance"], } for item in split["delegators"] if item["balance"] > 0