{"action":"created","comment":{"url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/comments/235352808","pull_request_review_id":177195901,"id":235352808,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTM1MjgwOA==","diff_hunk":"@@ -85,38 +91,49 @@ export default class RadixDataAccountSystem implements RadixAccountSystem {\n             hid,\n             applicationId,\n             data: applicationData,\n+            signatures,\n         }\n \n         this.applicationData.get(applicationId).delete(hid)\n         this.applicationDataSubject.next(applicationDataUpdate)\n     }\n \n-    public getApplicationData(\n-        applicationId: string\n-    ): Observable<RadixApplicationDataUpdate> {\n+    public getApplicationData(applicationId: string, addresses: string[]): Observable<RadixApplicationDataUpdate> {\n         return Observable.create(\n             (observer: Observer<RadixApplicationDataUpdate>) => {\n+\n                 // Send all old data\n                 if (this.applicationData.has(applicationId)) {\n                     for (const applicationData of this.applicationData\n                         .get(applicationId)\n                         .values()) {\n-                        const applicationDataUpdate = {\n-                            action: 'STORE',\n-                            hid: applicationData.hid,\n-                            applicationId: applicationId,\n-                            data: applicationData\n-                        }\n \n-                        observer.next(applicationDataUpdate)\n+                        if (!addresses \n+                            || addresses.length === 0\n+                            || addresses.some(a => \n+                                Object.keys(applicationData.signatures).includes(RadixKeyPair.fromAddress(a).getUID().toString()))) {","path":"src/modules/account/RadixDataAccountSystem.ts","position":77,"original_position":77,"commit_id":"5f8c4958bf05ccf8b5c1924f946b1f426ba091e2","original_commit_id":"5f8c4958bf05ccf8b5c1924f946b1f426ba091e2","user":{"login":"murraco","id":15709067,"node_id":"MDQ6VXNlcjE1NzA5MDY3","avatar_url":"https://avatars2.githubusercontent.com/u/15709067?v=4","gravatar_id":"","url":"https://api.github.com/users/murraco","html_url":"https://github.com/murraco","followers_url":"https://api.github.com/users/murraco/followers","following_url":"https://api.github.com/users/murraco/following{/other_user}","gists_url":"https://api.github.com/users/murraco/gists{/gist_id}","starred_url":"https://api.github.com/users/murraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murraco/subscriptions","organizations_url":"https://api.github.com/users/murraco/orgs","repos_url":"https://api.github.com/users/murraco/repos","events_url":"https://api.github.com/users/murraco/events{/privacy}","received_events_url":"https://api.github.com/users/murraco/received_events","type":"User","site_admin":false},"body":"Good point, though the cost of `RadixKeyPair.fromAddress(a).getUID().toString()` is almost depreciable as you can see from running the benchmarks in https://github.com/indutny/bn.js/blob/master/benchmarks/index.js.\r\n\r\nI think the most expensive methods here are `some` & `includes`, but they basically iterate over the arrays, so the complexity of this line is in the order of `O(n*m)` where `n = length of addresses` and `m = length of applicationData.signatures`.","created_at":"2018-11-21T11:36:36Z","updated_at":"2018-11-21T11:36:37Z","html_url":"https://github.com/radixdlt/radixdlt-js/pull/9#discussion_r235352808","pull_request_url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/comments/235352808"},"html":{"href":"https://github.com/radixdlt/radixdlt-js/pull/9#discussion_r235352808"},"pull_request":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9"}},"in_reply_to_id":235343830},"pull_request":{"url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9","id":232413186,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNDEzMTg2","html_url":"https://github.com/radixdlt/radixdlt-js/pull/9","diff_url":"https://github.com/radixdlt/radixdlt-js/pull/9.diff","patch_url":"https://github.com/radixdlt/radixdlt-js/pull/9.patch","issue_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/9","number":9,"state":"open","locked":false,"title":"Add application messages filtering by signer/s","user":{"login":"murraco","id":15709067,"node_id":"MDQ6VXNlcjE1NzA5MDY3","avatar_url":"https://avatars2.githubusercontent.com/u/15709067?v=4","gravatar_id":"","url":"https://api.github.com/users/murraco","html_url":"https://github.com/murraco","followers_url":"https://api.github.com/users/murraco/followers","following_url":"https://api.github.com/users/murraco/following{/other_user}","gists_url":"https://api.github.com/users/murraco/gists{/gist_id}","starred_url":"https://api.github.com/users/murraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murraco/subscriptions","organizations_url":"https://api.github.com/users/murraco/orgs","repos_url":"https://api.github.com/users/murraco/repos","events_url":"https://api.github.com/users/murraco/events{/privacy}","received_events_url":"https://api.github.com/users/murraco/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-20T18:10:54Z","updated_at":"2018-11-21T11:36:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"408b479b4fd1f88a599f7055a1bdd3bb729d7d03","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9/commits","review_comments_url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9/comments","review_comment_url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/9/comments","statuses_url":"https://api.github.com/repos/radixdlt/radixdlt-js/statuses/5f8c4958bf05ccf8b5c1924f946b1f426ba091e2","head":{"label":"radixdlt:rlau-60","ref":"rlau-60","sha":"5f8c4958bf05ccf8b5c1924f946b1f426ba091e2","user":{"login":"radixdlt","id":34097377,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDk3Mzc3","avatar_url":"https://avatars1.githubusercontent.com/u/34097377?v=4","gravatar_id":"","url":"https://api.github.com/users/radixdlt","html_url":"https://github.com/radixdlt","followers_url":"https://api.github.com/users/radixdlt/followers","following_url":"https://api.github.com/users/radixdlt/following{/other_user}","gists_url":"https://api.github.com/users/radixdlt/gists{/gist_id}","starred_url":"https://api.github.com/users/radixdlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radixdlt/subscriptions","organizations_url":"https://api.github.com/users/radixdlt/orgs","repos_url":"https://api.github.com/users/radixdlt/repos","events_url":"https://api.github.com/users/radixdlt/events{/privacy}","received_events_url":"https://api.github.com/users/radixdlt/received_events","type":"Organization","site_admin":false},"repo":{"id":145002583,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMDI1ODM=","name":"radixdlt-js","full_name":"radixdlt/radixdlt-js","private":false,"owner":{"login":"radixdlt","id":34097377,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDk3Mzc3","avatar_url":"https://avatars1.githubusercontent.com/u/34097377?v=4","gravatar_id":"","url":"https://api.github.com/users/radixdlt","html_url":"https://github.com/radixdlt","followers_url":"https://api.github.com/users/radixdlt/followers","following_url":"https://api.github.com/users/radixdlt/following{/other_user}","gists_url":"https://api.github.com/users/radixdlt/gists{/gist_id}","starred_url":"https://api.github.com/users/radixdlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radixdlt/subscriptions","organizations_url":"https://api.github.com/users/radixdlt/orgs","repos_url":"https://api.github.com/users/radixdlt/repos","events_url":"https://api.github.com/users/radixdlt/events{/privacy}","received_events_url":"https://api.github.com/users/radixdlt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/radixdlt/radixdlt-js","description":"A Javascript Client library for interacting with a RADIX Distributed Ledger.","fork":false,"url":"https://api.github.com/repos/radixdlt/radixdlt-js","forks_url":"https://api.github.com/repos/radixdlt/radixdlt-js/forks","keys_url":"https://api.github.com/repos/radixdlt/radixdlt-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radixdlt/radixdlt-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radixdlt/radixdlt-js/teams","hooks_url":"https://api.github.com/repos/radixdlt/radixdlt-js/hooks","issue_events_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/events{/number}","events_url":"https://api.github.com/repos/radixdlt/radixdlt-js/events","assignees_url":"https://api.github.com/repos/radixdlt/radixdlt-js/assignees{/user}","branches_url":"https://api.github.com/repos/radixdlt/radixdlt-js/branches{/branch}","tags_url":"https://api.github.com/repos/radixdlt/radixdlt-js/tags","blobs_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radixdlt/radixdlt-js/statuses/{sha}","languages_url":"https://api.github.com/repos/radixdlt/radixdlt-js/languages","stargazers_url":"https://api.github.com/repos/radixdlt/radixdlt-js/stargazers","contributors_url":"https://api.github.com/repos/radixdlt/radixdlt-js/contributors","subscribers_url":"https://api.github.com/repos/radixdlt/radixdlt-js/subscribers","subscription_url":"https://api.github.com/repos/radixdlt/radixdlt-js/subscription","commits_url":"https://api.github.com/repos/radixdlt/radixdlt-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/radixdlt/radixdlt-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/radixdlt/radixdlt-js/contents/{+path}","compare_url":"https://api.github.com/repos/radixdlt/radixdlt-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radixdlt/radixdlt-js/merges","archive_url":"https://api.github.com/repos/radixdlt/radixdlt-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radixdlt/radixdlt-js/downloads","issues_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues{/number}","pulls_url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls{/number}","milestones_url":"https://api.github.com/repos/radixdlt/radixdlt-js/milestones{/number}","notifications_url":"https://api.github.com/repos/radixdlt/radixdlt-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radixdlt/radixdlt-js/labels{/name}","releases_url":"https://api.github.com/repos/radixdlt/radixdlt-js/releases{/id}","deployments_url":"https://api.github.com/repos/radixdlt/radixdlt-js/deployments","created_at":"2018-08-16T14:54:46Z","updated_at":"2018-11-20T21:22:17Z","pushed_at":"2018-11-20T20:08:07Z","git_url":"git://github.com/radixdlt/radixdlt-js.git","ssh_url":"git@github.com:radixdlt/radixdlt-js.git","clone_url":"https://github.com/radixdlt/radixdlt-js.git","svn_url":"https://github.com/radixdlt/radixdlt-js","homepage":"","size":151,"stargazers_count":12,"watchers_count":12,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":3,"watchers":12,"default_branch":"master"}},"base":{"label":"radixdlt:develop","ref":"develop","sha":"1b48b30fc3797c80939226489b5d4bf81750cd4e","user":{"login":"radixdlt","id":34097377,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDk3Mzc3","avatar_url":"https://avatars1.githubusercontent.com/u/34097377?v=4","gravatar_id":"","url":"https://api.github.com/users/radixdlt","html_url":"https://github.com/radixdlt","followers_url":"https://api.github.com/users/radixdlt/followers","following_url":"https://api.github.com/users/radixdlt/following{/other_user}","gists_url":"https://api.github.com/users/radixdlt/gists{/gist_id}","starred_url":"https://api.github.com/users/radixdlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radixdlt/subscriptions","organizations_url":"https://api.github.com/users/radixdlt/orgs","repos_url":"https://api.github.com/users/radixdlt/repos","events_url":"https://api.github.com/users/radixdlt/events{/privacy}","received_events_url":"https://api.github.com/users/radixdlt/received_events","type":"Organization","site_admin":false},"repo":{"id":145002583,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMDI1ODM=","name":"radixdlt-js","full_name":"radixdlt/radixdlt-js","private":false,"owner":{"login":"radixdlt","id":34097377,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM0MDk3Mzc3","avatar_url":"https://avatars1.githubusercontent.com/u/34097377?v=4","gravatar_id":"","url":"https://api.github.com/users/radixdlt","html_url":"https://github.com/radixdlt","followers_url":"https://api.github.com/users/radixdlt/followers","following_url":"https://api.github.com/users/radixdlt/following{/other_user}","gists_url":"https://api.github.com/users/radixdlt/gists{/gist_id}","starred_url":"https://api.github.com/users/radixdlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radixdlt/subscriptions","organizations_url":"https://api.github.com/users/radixdlt/orgs","repos_url":"https://api.github.com/users/radixdlt/repos","events_url":"https://api.github.com/users/radixdlt/events{/privacy}","received_events_url":"https://api.github.com/users/radixdlt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/radixdlt/radixdlt-js","description":"A Javascript Client library for interacting with a RADIX Distributed Ledger.","fork":false,"url":"https://api.github.com/repos/radixdlt/radixdlt-js","forks_url":"https://api.github.com/repos/radixdlt/radixdlt-js/forks","keys_url":"https://api.github.com/repos/radixdlt/radixdlt-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radixdlt/radixdlt-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radixdlt/radixdlt-js/teams","hooks_url":"https://api.github.com/repos/radixdlt/radixdlt-js/hooks","issue_events_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/events{/number}","events_url":"https://api.github.com/repos/radixdlt/radixdlt-js/events","assignees_url":"https://api.github.com/repos/radixdlt/radixdlt-js/assignees{/user}","branches_url":"https://api.github.com/repos/radixdlt/radixdlt-js/branches{/branch}","tags_url":"https://api.github.com/repos/radixdlt/radixdlt-js/tags","blobs_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radixdlt/radixdlt-js/statuses/{sha}","languages_url":"https://api.github.com/repos/radixdlt/radixdlt-js/languages","stargazers_url":"https://api.github.com/repos/radixdlt/radixdlt-js/stargazers","contributors_url":"https://api.github.com/repos/radixdlt/radixdlt-js/contributors","subscribers_url":"https://api.github.com/repos/radixdlt/radixdlt-js/subscribers","subscription_url":"https://api.github.com/repos/radixdlt/radixdlt-js/subscription","commits_url":"https://api.github.com/repos/radixdlt/radixdlt-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/radixdlt/radixdlt-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/radixdlt/radixdlt-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/radixdlt/radixdlt-js/contents/{+path}","compare_url":"https://api.github.com/repos/radixdlt/radixdlt-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radixdlt/radixdlt-js/merges","archive_url":"https://api.github.com/repos/radixdlt/radixdlt-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radixdlt/radixdlt-js/downloads","issues_url":"https://api.github.com/repos/radixdlt/radixdlt-js/issues{/number}","pulls_url":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls{/number}","milestones_url":"https://api.github.com/repos/radixdlt/radixdlt-js/milestones{/number}","notifications_url":"https://api.github.com/repos/radixdlt/radixdlt-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radixdlt/radixdlt-js/labels{/name}","releases_url":"https://api.github.com/repos/radixdlt/radixdlt-js/releases{/id}","deployments_url":"https://api.github.com/repos/radixdlt/radixdlt-js/deployments","created_at":"2018-08-16T14:54:46Z","updated_at":"2018-11-20T21:22:17Z","pushed_at":"2018-11-20T20:08:07Z","git_url":"git://github.com/radixdlt/radixdlt-js.git","ssh_url":"git@github.com:radixdlt/radixdlt-js.git","clone_url":"https://github.com/radixdlt/radixdlt-js.git","svn_url":"https://github.com/radixdlt/radixdlt-js","homepage":"","size":151,"stargazers_count":12,"watchers_count":12,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":3,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9"},"html":{"href":"https://github.com/radixdlt/radixdlt-js/pull/9"},"issue":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/9"},"comments":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/radixdlt/radixdlt-js/statuses/5f8c4958bf05ccf8b5c1924f946b1f426ba091e2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"murraco"}}