Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/modules/blockchain/blockchain-module-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ class BlockchainModuleManager extends BaseModuleManager {
]);
}

async getV81ReleaseEpoch(blockchain) {
return this.callImplementationFunction(blockchain, 'getV81ReleaseEpoch');
}

async getAssetStorageContractsAddress(blockchain) {
return this.callImplementationFunction(blockchain, 'getAssetStorageContractsAddress');
}
Expand Down
9 changes: 9 additions & 0 deletions src/modules/blockchain/implementation/web3-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,15 @@ class Web3Service {
});
}

async getV81ReleaseEpoch() {
return this.callContractFunction(
this.contracts.ParametersStorage,
'v81ReleaseEpoch',
[],
CONTRACTS.PARAMETERS_STORAGE,
);
}

async getAssetStorageContractsAddress() {
return Object.keys(this.assetStorageContracts);
}
Expand Down
8 changes: 5 additions & 3 deletions src/service/claim-rewards-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ class ClaimRewardsService {
);
// TODO: How will this impact mainnet where this function landed at same time as proofing
if (!hasEverDelegated) {
if (lastClaimedEpochAddressesMap[`${currentEpoch - 1}`]) {
lastClaimedEpochAddressesMap[`${currentEpoch - 1}`].push(
const v81ReleaseEpoch =
await this.blockchainModuleManager.getV81ReleaseEpoch(blockchainId);
if (lastClaimedEpochAddressesMap[`${v81ReleaseEpoch - 1}`]) {
lastClaimedEpochAddressesMap[`${v81ReleaseEpoch - 1}`].push(
...delegatorAddresses,
);
} else {
lastClaimedEpochAddressesMap[`${currentEpoch - 1}`] =
lastClaimedEpochAddressesMap[`${v81ReleaseEpoch - 1}`] =
delegatorAddresses;
}
}
Expand Down
Loading