Skip to content

Commit

Permalink
Add current delegator balance to reward splits
Browse files Browse the repository at this point in the history
  • Loading branch information
Groxan committed Jun 8, 2020
1 parent df9472c commit ba5cdc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Tzkt.Api/Models/Baking/SplitDelegator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public class SplitDelegator
/// </summary>
public long Balance { get; set; }

/// <summary>
/// Balance of the delegator at the moment
/// </summary>
public long CurrentBalance { get; set; }

/// <summary>
/// Indicates whether the delegator is emptied (at the moment, not at the snapshot time).
/// Emptied accounts (users with zero balance) should be re-allocated, so if you make payment to emptied account you will pay (burn) `0.257 tez` allocation fee.
Expand Down
1 change: 1 addition & 0 deletions Tzkt.Api/Repositories/RewardsRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,7 @@ public async Task<RewardSplit> GetRewardSplit(string address, int cycle, int off
{
Address = delegator.Address,
Balance = x.Balance,
CurrentBalance = delegator.Balance,
Emptied = delegator is RawUser && delegator.Balance == 0
};
})
Expand Down

0 comments on commit ba5cdc6

Please sign in to comment.