Skip to content

Commit

Permalink
first pass at connect flow and grants api
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 20, 2024
1 parent 2d0b423 commit 29a2870
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/api/src/web5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 4 additions & 0 deletions packages/api/tests/dwn-api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 29a2870

Please sign in to comment.