diff --git a/apps/api/src/app/groups/groups.service.test.ts b/apps/api/src/app/groups/groups.service.test.ts index 05249b02..ffb10bf9 100644 --- a/apps/api/src/app/groups/groups.service.test.ts +++ b/apps/api/src/app/groups/groups.service.test.ts @@ -166,10 +166,10 @@ describe("GroupsService", () => { ) expect(treeDepth).toBe(newTreeDepth) - expect( - // @ts-ignore - groupsService.bandadaContract.updateGroups - ).toHaveBeenCalled() + // expect( + // // @ts-ignore + // groupsService.bandadaContract.updateGroups + // ).toHaveBeenCalled() }) }) @@ -290,21 +290,21 @@ describe("GroupsService", () => { expect(members).toHaveLength(1) }) - it("Should update contract on adding member", async () => { - const invite2 = await invitesService.createInvite( - { groupId }, - "admin" - ) + // it("Should update contract on adding member", async () => { + // const invite2 = await invitesService.createInvite( + // { groupId }, + // "admin" + // ) - await groupsService.joinGroup(groupId, "124", { - inviteCode: invite2.code - }) + // await groupsService.joinGroup(groupId, "124", { + // inviteCode: invite2.code + // }) - expect( - // @ts-ignore - groupsService.bandadaContract.updateGroups - ).toHaveBeenCalled() - }) + // expect( + // // @ts-ignore + // groupsService.bandadaContract.updateGroups + // ).toHaveBeenCalled() + // }) it("Should not add any member if they already exist", async () => { const fun = groupsService.joinGroup(groupId, "123123", { diff --git a/apps/api/src/app/groups/groups.service.ts b/apps/api/src/app/groups/groups.service.ts index dfd8b17a..0827b94c 100644 --- a/apps/api/src/app/groups/groups.service.ts +++ b/apps/api/src/app/groups/groups.service.ts @@ -49,11 +49,11 @@ export class GroupsService { await this._cacheGroups() /* istanbul ignore next */ - if (process.env.NODE_ENV !== "test") { - setTimeout(async () => { - await this._syncContractGroups() - }, 5000) - } + // if (process.env.NODE_ENV !== "test") { + // setTimeout(async () => { + // await this._syncContractGroups() + // }, 5000) + // } } /** @@ -96,7 +96,7 @@ export class GroupsService { this.cachedGroups.set(_groupId, cachedGroup) - this._updateFingerprintDuration(group.id, fingerprintDuration) + // this._updateFingerprintDuration(group.id, fingerprintDuration) Logger.log( `GroupsService: group '${name}' has been created with id '${_groupId}'` @@ -169,7 +169,7 @@ export class GroupsService { group.members.map((m) => m.id) ) this.cachedGroups.set(groupId, cachedGroup) - this._updateContractGroup(cachedGroup) + // this._updateContractGroup(cachedGroup) } if (group.credentials && credentials) { @@ -380,7 +380,7 @@ export class GroupsService { `GroupsService: member '${memberId}' has been added to the group '${group.name}'` ) - this._updateContractGroup(cachedGroup) + // this._updateContractGroup(cachedGroup) return group } @@ -432,7 +432,7 @@ export class GroupsService { ) }) - this._updateContractGroup(cachedGroup) + // this._updateContractGroup(cachedGroup) return group } @@ -510,7 +510,7 @@ export class GroupsService { }) ) - this._updateContractGroup(cachedGroup) + // this._updateContractGroup(cachedGroup) return this.getGroup(groupId) } @@ -588,7 +588,7 @@ export class GroupsService { }) ) - this._updateContractGroup(cachedGroup) + // this._updateContractGroup(cachedGroup) return this.getGroup(groupId) }