From 98c07a42f4d7238489b84d0931752d2e2c4438d6 Mon Sep 17 00:00:00 2001 From: Huseyin ABANOZ Date: Wed, 25 Sep 2019 20:33:48 +0300 Subject: [PATCH] check presence of lost_fees_denounciation_baking --- src/tzscan/tzscan_reward_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tzscan/tzscan_reward_api.py b/src/tzscan/tzscan_reward_api.py index 62fd715f..45f6ed90 100644 --- a/src/tzscan/tzscan_reward_api.py +++ b/src/tzscan/tzscan_reward_api.py @@ -30,7 +30,11 @@ def get_rewards_for_cycle_map(self, cycle): else: lost_rewards_denounciation = int(root["lost_rewards_denounciation"]) - lost_fees_denounciation = int(root["lost_fees_denounciation_baking"])+int(root["lost_fees_denounciation_endorsement"]) + if "lost_fees_denounciation_baking" in root: + lost_fees_denounciation = int(root["lost_fees_denounciation_baking"])+int(root["lost_fees_denounciation_endorsement"]) + else: + lost_fees_denounciation = int(root["lost_fees_denounciation"]) + fees = int(root["fees"]) total_reward_amount = (blocks_rewards + endorsements_rewards + future_blocks_rewards +