Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 28, 2024
1 parent 3a21e9b commit abebe0a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/agent/tests/connect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,9 @@ describe('web5 connect', function () {
}
};

const permissionRequests = WalletConnect.createPermissionRequestForProtocol(protocol, []);
const permissionRequests = WalletConnect.createPermissionRequestForProtocol({
definition: protocol, permissions: []
});

expect(permissionRequests.protocolDefinition).to.deep.equal(protocol);
expect(permissionRequests.permissionScopes.length).to.equal(3); // only includes the sync permissions
Expand All @@ -529,7 +531,9 @@ describe('web5 connect', function () {
}
};

const permissionRequests = WalletConnect.createPermissionRequestForProtocol(protocol, ['write', 'read']);
const permissionRequests = WalletConnect.createPermissionRequestForProtocol({
definition: protocol, permissions: ['write', 'read']
});

expect(permissionRequests.protocolDefinition).to.deep.equal(protocol);

Expand All @@ -554,7 +558,9 @@ describe('web5 connect', function () {
}
};

const permissionRequests = WalletConnect.createPermissionRequestForProtocol(protocol, ['write', 'read', 'delete', 'query', 'subscribe']);
const permissionRequests = WalletConnect.createPermissionRequestForProtocol({
definition: protocol, permissions: ['write', 'read', 'delete', 'query', 'subscribe']
});

expect(permissionRequests.protocolDefinition).to.deep.equal(protocol);

Expand Down

0 comments on commit abebe0a

Please sign in to comment.