Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions packages/backend/src/nest/auth/sigchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ import EventEmitter from 'events'
import { LockboxService } from './services/crypto/lockbox.service'
import { ChannelService } from './services/roles/channel.service'
import { LFAEvents, RANDOM_TEAM_NAME_LENGTH, SigchainEvents } from './types'
import { Serializer } from '../common/serializer.service'
import { randomKey } from '@localfirst/crypto'

const logger = createLogger('auth:sigchain')
const lfaLogger = createLogger('localfirst')

class SigChain extends EventEmitter {
private static serializer = new Serializer()
private _context: auth.MemberContext | auth.InviteeMemberContext
private _users: UserService | null = null
private _devices: DeviceService | null = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ describe('ConnectionsManagerService', () => {
const resetStateSpy = jest.spyOn(connectionsManagerService, 'resetState').mockResolvedValue()
const localDbOpenSpy = jest.spyOn(localDbService, 'open').mockResolvedValue()
const closeSocketSpy = jest.spyOn(connectionsManagerService, 'closeSocket').mockResolvedValue()
sigChainService.activeChainTeamId = community.name
sigChainService.activeChainTeamId = community.teamId

await (connectionsManagerService as any).erasePreviousCommunityArtifacts()

Expand Down Expand Up @@ -581,7 +581,7 @@ describe('ConnectionsManagerService', () => {
jest.spyOn(connectionsManagerService['tor'], 'resetHiddenServices').mockImplementation(() => {})
jest.spyOn(connectionsManagerService, 'resetState').mockResolvedValue()
jest.spyOn(localDbService, 'open').mockResolvedValue()
sigChainService.activeChainTeamId = community.name
sigChainService.activeChainTeamId = community.teamId

await (connectionsManagerService as any).erasePreviousCommunityArtifacts()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
Identity,
PeerId as QuietPeerId,
InvitationDataVersion,
InvitationDataV2,
PermissionsError,
CommunityOwnership,
InitCommunityPayload,
Expand Down Expand Up @@ -82,7 +81,6 @@ import { SigchainEvents } from '../auth/types'
import { QPSService } from '../qps/qps.service'
import { CaptchaService } from '../captcha/captcha.service'
import { SigChain } from '../auth/sigchain'
import { teamKeyring } from '3rd-party/auth/packages/auth/dist/team/selectors'

/**
* A monolith service that handles lots of events received from the state-manager.
Expand Down
9 changes: 1 addition & 8 deletions packages/backend/src/nest/qss/qss.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,7 @@ import { SigChainService } from '../auth/sigchain.service'
import { RoleName } from '../auth/services/roles/roles'
import { LocalDbService } from '../local-db/local-db.service'
import { QSS_RECONNECT_BACKOFF_FACTOR, QSS_RECONNECT_DELAY_MS, QSS_RECONNECT_MAX_DELAY_MS } from './qss.const'
import {
CompoundError,
InvitationDataV3,
NseQssUrlUpdatedEvent,
SocketActions,
SocketEvents,
type InvitationDataV5,
} from '@quiet/types'
import { CompoundError, NseQssUrlUpdatedEvent, SocketActions, SocketEvents, type InvitationDataV5 } from '@quiet/types'
import { LocalDbEvents } from '../local-db/local-db.types'
import { SocketService } from '../socket/socket.service'
import { QSSSyncManager } from './qss-sync-manager.service'
Expand Down
10 changes: 1 addition & 9 deletions packages/common/src/invitationLink/invitationLink.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
InvitationDataV1,
InvitationDataV2,
InvitationDataV3,
InvitationDataVersion,
InvitationPair,
type InvitationDataV4,
type InvitationDataV5,
} from '@quiet/types'
import { InvitationDataVersion, InvitationPair, type InvitationDataV4, type InvitationDataV5 } from '@quiet/types'
import {
argvInvitationLink,
composeInvitationDeepUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ describe('communitiesSelectors', () => {
expect(invitationUrl).toEqual('')
})

it('invitationUrl selector returns proper v2 url when community and long lived invite are defined', async () => {
it('invitationUrl selector returns proper v4 url when community and long lived invite are defined', async () => {
const store = prepareStore().store
const factory = await getReduxStoreFactory(store)

logger.info('invitationUrl selector returns proper v2 url when community and long lived invite are defined')
logger.info('invitationUrl selector returns proper v4 url when community and long lived invite are defined')
const psk = '12345'
const ownerOrbitDbIdentity = 'testOwnerOrbitDbIdentity'
await factory.create<ReturnType<typeof communitiesActions.addNewCommunity>['payload']>('Community', {
Expand Down Expand Up @@ -179,7 +179,7 @@ describe('communitiesSelectors', () => {
expect(selectorInvitationUrl).toEqual(expectedUrl)
})

it('invitationUrl selector returns proper v3 url when community and long lived invite are defined and qss is enabled', async () => {
it('invitationUrl selector returns proper v5 url when community and long lived invite are defined and qss is enabled', async () => {
const store = prepareStore().store
const factory = await getReduxStoreFactory(store)

Expand Down
Loading