Skip to content

Commit

Permalink
Fix(2321): No Duplicate CSRs (#2460)
Browse files Browse the repository at this point in the history
* Fix issue of duplicate CRSs being generated

* Install LFS with checkout to avoid random errors
  • Loading branch information
Isla Koenigsknecht authored Apr 18, 2024
1 parent ce027b2 commit 0966478
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/e2e-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Install dependencies
run: |
npm i
npm run lerna bootstrap --scope @quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/mobile,backend-bundle
- name: Pull binaries
run: |
git lfs install
git lfs pull
- name: Pass local config
run : |
cat << EOF >> packages/mobile/android/local.properties
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/e2e-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
lfs: true

- name: Install dependencies
run: |
npm i
npm run lerna bootstrap --scope @quiet/eslint-config,@quiet/logger,@quiet/common,@quiet/types,@quiet/state-manager,@quiet/backend,@quiet/identity,@quiet/mobile,backend-bundle
- name: Pull binaries
run: |
git lfs install
git lfs pull
- name: Install pods
run: |
cd packages/mobile/ios
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# Fixes:

* Don't create duplicate CSRs when joining a community under certain circumstances ([#2321](https://github.com/TryQuiet/quiet/issues/2321))

[2.2.0]

# New features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class CertificatesRequestsStore extends EventEmitter {
write: ['*'],
},
})
await this.store.load()

this.store.events.on('write', async (_address, entry) => {
this.logger('Added CSR to database')
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/nest/storage/storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export class StorageService extends EventEmitter {

public async updatePeersList() {
const users = this.getAllUsers()
const peers = users.map(peer => createLibp2pAddress(peer.onionAddress, peer.peerId))
const peers = Array.from(new Set(users.map(peer => createLibp2pAddress(peer.onionAddress, peer.peerId))))
console.log('updatePeersList, peers count:', peers.length)

const community = await this.localDbService.getCurrentCommunity()
Expand Down

0 comments on commit 0966478

Please sign in to comment.