From df59100b952f29bfcf0a02357fd0a7bf8d318213 Mon Sep 17 00:00:00 2001 From: Kacper Michalik Date: Wed, 25 Oct 2023 13:16:48 +0200 Subject: [PATCH] feat: load CSRs nad trigger e2e mobile --- packages/backend/src/nest/storage/storage.service.spec.ts | 3 ++- packages/backend/src/nest/storage/storage.service.ts | 2 ++ .../src/components/JoinCommunity/JoinCommunity.stories.tsx | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/nest/storage/storage.service.spec.ts b/packages/backend/src/nest/storage/storage.service.spec.ts index 0bbd03efda..c9e4201e27 100644 --- a/packages/backend/src/nest/storage/storage.service.spec.ts +++ b/packages/backend/src/nest/storage/storage.service.spec.ts @@ -580,7 +580,8 @@ describe('StorageService', () => { ]) }) - it('getCsrs - remove old csrs and replace with new for each pubkey', async () => { + it.only('getCsrs - remove old csrs and replace with new for each pubkey', async () => { + await storageService.init(peerId) const allCsrs = [ 'MIIDITCCAsYCAQAwSTFHMEUGA1UEAxM+anR3c3hxMnZ1dWthY3JodWhvdnAzd2JxbzRxNXc0d2s3Nm1qbWJ3cXk3eGNma2FsdmRxb3hhYWQub25pb24wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQE2q6iS+WCmIVCSFI2AjHrW6ujUdrceD5T2xkcTJBTn0y50WphcupUajCRgkXaTBkTsGNJ3qWRZAKX7CiuehBJoIICGTAuBgkqhkiG9w0BCQ4xITAfMB0GA1UdDgQWBBQuE5JgPY/BYBpgG5pnjMkEEIkrGjCCAUcGCSqGSIb3DQEJDDGCATgEggE0BDlx84glBl72q82F2a+y8iTVKM8IMiXYYrmNyhFPj6XsfVQpvLhNviZ5zHdMBWbFj44vTSUIasNP9I9eCWSEAaEJqjngEh18WCRS/XbvQxI/8qB5pzcfghvM8BCgSLbSEjK2GMYVhCXmRH1YGHIZu0+Ii9pe5nwG154JlPUsmIRgu6ruY6PQk65Aoo4OyhPn5CCUFInptHcz1JpAiCRe0Z6wuQHud03VY50fx4ETdmUNJBEIPOyd/Xn6lMOi6SaWGHbCWiufeJRm+mRdoHJAEt6kPLhGIYGyduNT/8cGoe2xKyQDvNoTr4dqqRZ2HgZ18nicsTHswpGqAlUnZXaA3V85Qu1cvaMAqEoPOUlGP9AriIVwtIZM0hdWHqKHgBCZrKfHb5oLxt6ourQ3+q19tvx+u6UwFAYKKwYBBAGDjBsCATEGEwRlbGxvMD0GCSsGAQIBDwMBATEwEy5RbVVvNXN0NXNqR3RFMUtQeXhOVW5pTWhnQXduV0JVNXk3TnpoMlpRRkdacVdiMEcGA1UdETFAEz5qdHdzeHEydnV1a2Fjcmh1aG92cDN3YnFvNHE1dzR3azc2bWptYndxeTd4Y2ZrYWx2ZHFveGFhZC5vbmlvbjAKBggqhkjOPQQDAgNJADBGAiEAt9udw7B7vnjJyWvkkRLb7DImFXwsrSxirqbmhIH+1rUCIQD86GWyfAE2d8gCNAn4h1t9B+mAx33ZdPLgFssHl1i3pA==', diff --git a/packages/backend/src/nest/storage/storage.service.ts b/packages/backend/src/nest/storage/storage.service.ts index c16fd423de..51c71e68d6 100644 --- a/packages/backend/src/nest/storage/storage.service.ts +++ b/packages/backend/src/nest/storage/storage.service.ts @@ -423,6 +423,8 @@ export class StorageService extends EventEmitter { } public async getCsrs(): Promise { + // @ts-expect-error - OrbitDB's type declaration of `load` lacks 'options' + await this.certificatesRequests.load({ fetchEntryTimeout: 15000 }) const allCsrs = this.getAllEventLogEntries(this.certificatesRequests) const filteredCsrsMap: Map = new Map() diff --git a/packages/mobile/src/components/JoinCommunity/JoinCommunity.stories.tsx b/packages/mobile/src/components/JoinCommunity/JoinCommunity.stories.tsx index 721031ab4f..b9343b8437 100644 --- a/packages/mobile/src/components/JoinCommunity/JoinCommunity.stories.tsx +++ b/packages/mobile/src/components/JoinCommunity/JoinCommunity.stories.tsx @@ -1,7 +1,6 @@ import { storiesOf } from '@storybook/react-native' import React from 'react' import { storybookLog } from '../../utils/functions/storybookLog/storybookLog.function' - import { JoinCommunity } from './JoinCommunity.component' storiesOf('JoinCommunity', module).add('Default', () => (