Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
feat: adds support to read contract versions dynamically (#2840)
Browse files Browse the repository at this point in the history
  • Loading branch information
meetkosiso committed Jul 29, 2023
1 parent 010140a commit 3313710
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/apps/halofi/common/halofi.game.constants.ts
Expand Up @@ -71,14 +71,12 @@ export async function retry(onRetry: (...args: any[]) => any, args: any[], maxRe
return retryWithBackoff(0);
}

const ContractVersions = ['2.0.0', '2.0.1', '2.0.2', '2.0.3', '2.0.4'];
const ContractVersions = ['2.0'];

export const getGameVersionType = (contractVersion: string) => {
if (ContractVersions.includes(contractVersion)) {
return true;
}
const [derivedContractVersion] = contractVersion.split('-');
if (ContractVersions.includes(derivedContractVersion)) {
const baseContractVersion = contractVersion.slice(0, 3);

if (ContractVersions.indexOf(baseContractVersion) !== -1) {
return true;
}
return false;
Expand Down

0 comments on commit 3313710

Please sign in to comment.