diff --git a/packages/api/src/web5.ts b/packages/api/src/web5.ts index e905332c5..8dda6aca3 100644 --- a/packages/api/src/web5.ts +++ b/packages/api/src/web5.ts @@ -370,7 +370,9 @@ export class Web5 { // Enable sync, unless explicitly disabled. if (sync !== 'off') { // First, register the user identity for sync. - await userAgent.sync.registerIdentity({ did: connectedDid }); + await userAgent.sync.registerIdentity({ did: connectedDid, options: { + protocols: [] // TODO: Add protocols to sync + } }); // Enable sync using the specified interval or default. sync ??= '2m'; diff --git a/packages/api/tests/dwn-api.spec.ts b/packages/api/tests/dwn-api.spec.ts index 16ae2f8bc..870b0caa5 100644 --- a/packages/api/tests/dwn-api.spec.ts +++ b/packages/api/tests/dwn-api.spec.ts @@ -46,6 +46,10 @@ describe('DwnApi', () => { // Instantiate DwnApi for both test identities. dwnAlice = new DwnApi({ agent: testHarness.agent, connectedDid: aliceDid.uri }); dwnBob = new DwnApi({ agent: testHarness.agent, connectedDid: bobDid.uri }); + + // clear cached permissions between test runs + dwnAlice['cachedPermissions'].clear(); + dwnBob['cachedPermissions'].clear(); }); after(async () => {