Return empty levels in GET /addresses/online/levels

This commit is contained in:
CalDescent 2022-10-03 10:58:47 +01:00 committed by Matthew DeGarmo
parent 27104a6b76
commit d7d0848e90

View File

@ -205,6 +205,10 @@ public class AddressesResource {
try (final Repository repository = RepositoryManager.getRepository()) {
List<OnlineAccountLevel> onlineAccountLevels = new ArrayList<>();
// Prepopulate all levels
for (int i=0; i<=10; i++)
onlineAccountLevels.add(new OnlineAccountLevel(i, 0));
for (OnlineAccountData onlineAccountData : onlineAccounts) {
try {
final int minterLevel = Account.getRewardShareEffectiveMintingLevelIncludingLevelZero(repository, onlineAccountData.getPublicKey());