-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- bug fix: baking rewards index out of bounds for new users
- add another unit test case to cover this
- Loading branch information
Showing
6 changed files
with
181 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Tests/KukaiCoreSwiftTests/Stubs/tzkt_baker-config-tz1bdTgmF8pzBH9chtJptsjjrh5UfSXp1SQ4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"address": "tz1bdTgmF8pzBH9chtJptsjjrh5UfSXp1SQ4", | ||
"name": "Teztillery", | ||
"logo": "https://services.tzkt.io/v1/avatars/tz1bdTgmF8pzBH9chtJptsjjrh5UfSXp1SQ4", | ||
"balance": 2187.553015, | ||
"stakingBalance": 10120.963766, | ||
"stakingCapacity": 11897.932014, | ||
"maxStakingBalance": 11897.932014, | ||
"freeSpace": 3098.9606940000003, | ||
"fee": 0.0499, | ||
"minDelegation": 10, | ||
"payoutDelay": 1, | ||
"payoutPeriod": 1, | ||
"openForDelegation": true, | ||
"estimatedRoi": 0.05916, | ||
"serviceType": "tezos_only", | ||
"serviceHealth": "active", | ||
"payoutTiming": "no_data", | ||
"payoutAccuracy": "no_data", | ||
"insuranceCoverage": 0 | ||
} |
106 changes: 106 additions & 0 deletions
106
Tests/KukaiCoreSwiftTests/Stubs/tzkt_delegator-rewards-none.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[ | ||
{ | ||
"cycle": 752, | ||
"delegatedBalance": 730253, | ||
"stakedBalance": 0, | ||
"baker": { | ||
"alias": "Teztillery", | ||
"address": "tz1bdTgmF8pzBH9chtJptsjjrh5UfSXp1SQ4" | ||
}, | ||
"bakingPower": 0, | ||
"totalBakingPower": 378988343190364, | ||
"bakerDelegatedBalance": 335560569, | ||
"externalDelegatedBalance": 7535104289, | ||
"bakerStakedBalance": 1321992446, | ||
"externalStakedBalance": 0, | ||
"expectedBlocks": 0, | ||
"expectedEndorsements": 0, | ||
"futureBlocks": 0, | ||
"futureBlockRewards": 0, | ||
"blocks": 0, | ||
"blockRewardsDelegated": 0, | ||
"blockRewardsStakedOwn": 0, | ||
"blockRewardsStakedEdge": 0, | ||
"blockRewardsStakedShared": 0, | ||
"missedBlocks": 0, | ||
"missedBlockRewards": 0, | ||
"futureEndorsements": 0, | ||
"futureEndorsementRewards": 0, | ||
"endorsements": 0, | ||
"endorsementRewardsDelegated": 0, | ||
"endorsementRewardsStakedOwn": 0, | ||
"endorsementRewardsStakedEdge": 0, | ||
"endorsementRewardsStakedShared": 0, | ||
"missedEndorsements": 0, | ||
"missedEndorsementRewards": 0, | ||
"blockFees": 0, | ||
"missedBlockFees": 0, | ||
"doubleBakingRewards": 0, | ||
"doubleBakingLostStaked": 0, | ||
"doubleBakingLostUnstaked": 0, | ||
"doubleBakingLostExternalStaked": 0, | ||
"doubleBakingLostExternalUnstaked": 0, | ||
"doubleEndorsingRewards": 0, | ||
"doubleEndorsingLostStaked": 0, | ||
"doubleEndorsingLostUnstaked": 0, | ||
"doubleEndorsingLostExternalStaked": 0, | ||
"doubleEndorsingLostExternalUnstaked": 0, | ||
"doublePreendorsingRewards": 0, | ||
"doublePreendorsingLostStaked": 0, | ||
"doublePreendorsingLostUnstaked": 0, | ||
"doublePreendorsingLostExternalStaked": 0, | ||
"doublePreendorsingLostExternalUnstaked": 0, | ||
"vdfRevelationRewardsDelegated": 0, | ||
"vdfRevelationRewardsStakedOwn": 0, | ||
"vdfRevelationRewardsStakedEdge": 0, | ||
"vdfRevelationRewardsStakedShared": 0, | ||
"nonceRevelationRewardsDelegated": 0, | ||
"nonceRevelationRewardsStakedOwn": 0, | ||
"nonceRevelationRewardsStakedEdge": 0, | ||
"nonceRevelationRewardsStakedShared": 0, | ||
"nonceRevelationLosses": 0, | ||
"blockRewardsLiquid": 0, | ||
"endorsementRewardsLiquid": 0, | ||
"nonceRevelationRewardsLiquid": 0, | ||
"vdfRevelationRewardsLiquid": 0, | ||
"revelationRewards": 0, | ||
"revelationLosses": 0, | ||
"doublePreendorsingLosses": 0, | ||
"doubleEndorsingLosses": 0, | ||
"doubleBakingLosses": 0, | ||
"endorsementRewards": 0, | ||
"blockRewards": 0, | ||
"stakingBalance": 9192657304, | ||
"activeStake": 0, | ||
"selectedStake": 378988343190364, | ||
"balance": 730253, | ||
"ownBlocks": 0, | ||
"extraBlocks": 0, | ||
"missedOwnBlocks": 0, | ||
"missedExtraBlocks": 0, | ||
"uncoveredOwnBlocks": 0, | ||
"uncoveredExtraBlocks": 0, | ||
"uncoveredEndorsements": 0, | ||
"ownBlockRewards": 0, | ||
"extraBlockRewards": 0, | ||
"missedOwnBlockRewards": 0, | ||
"missedExtraBlockRewards": 0, | ||
"uncoveredOwnBlockRewards": 0, | ||
"uncoveredExtraBlockRewards": 0, | ||
"uncoveredEndorsementRewards": 0, | ||
"ownBlockFees": 0, | ||
"extraBlockFees": 0, | ||
"missedOwnBlockFees": 0, | ||
"missedExtraBlockFees": 0, | ||
"uncoveredOwnBlockFees": 0, | ||
"uncoveredExtraBlockFees": 0, | ||
"doubleBakingLostDeposits": 0, | ||
"doubleBakingLostRewards": 0, | ||
"doubleBakingLostFees": 0, | ||
"doubleEndorsingLostDeposits": 0, | ||
"doubleEndorsingLostRewards": 0, | ||
"doubleEndorsingLostFees": 0, | ||
"revelationLostRewards": 0, | ||
"revelationLostFees": 0 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[ | ||
{ | ||
"alias": "Tezex Bakery Payouts", | ||
"address": "tz1cBvEkYWV7RjTkd2kEcMPLwP62pqivXNEi" | ||
} | ||
] |