Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Buslaev <[email protected]>
  • Loading branch information
artembuslaev committed Aug 22, 2024
1 parent 4f3b242 commit 494ffae
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions guardian-service/src/api/contract.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3102,10 +3102,14 @@ export async function contractAPI(
owner.creator
);

const contract = await contractRepository.findOne({
contractId: request.contractId,
owner
})
const contract: { version: string } = await contractRepository.findOne({
contractId: request.contractId
}, { field: ['version'] });

const error = await checkContractsCompatibility(workers, contractRepository, contract, request.tokens);
if (error) {
throw new Error(error);
}

let result;
if (contract.version === '1.0.0') {
Expand Down

0 comments on commit 494ffae

Please sign in to comment.