{"action":"created","comment":{"url":"https://api.github.com/repos/teamdigitale/italia-app/pulls/comments/194760698","pull_request_review_id":127991967,"id":194760698,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDc2MDY5OA==","diff_hunk":"@@ -0,0 +1,70 @@\n+/**\n+ * IndexedObject helps creating objects that\n+ * are indexed by their id (storing both\n+ * byId and allIds)\n+ */\n+\n+import { none, Option, some } from \"fp-ts/lib/Option\";\n+\n+type Id = string | number;\n+\n+// an object with an identifier\n+// (assuming strings and numbers\n+// only as identifiers -- change as needed)\n+interface WithId {\n+  id: Id;\n+}\n+\n+/**\n+ * represents a \"list\" of objects that have\n+ * been indexed by their \"id\" property\n+ */\n+interface IndexedById<V extends WithId> {\n+  [key: string]: V;\n+  [key: number]: V;\n+}\n+\n+/**\n+ * An indexed object generated from a list of objects:\n+ * Instantiated by IndexedObject.create()\n+ *  - input: [ { id: 1, payload: \"X\" }, { id: 42, payload: \"Y\" } ]\n+ *  - output:\n+ *    {\n+ *      byId: { 1: { id: 1, payload: \"X\" }, 42: { id: 42, payload: \"Y\" } },\n+ *      allIds: [1, 42]\n+ *    }\n+ *  - V: object with an index (named id) (e.g. CreditCard)\n+ */\n+export class IndexedObject<V extends WithId> {","path":"ts/store/helpers/indexer.ts","position":38,"original_position":38,"commit_id":"e6490dd80fcc658fda573abddd633f5f025cff84","original_commit_id":"e6490dd80fcc658fda573abddd633f5f025cff84","user":{"login":"cloudify","id":48206,"node_id":"MDQ6VXNlcjQ4MjA2","avatar_url":"https://avatars2.githubusercontent.com/u/48206?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudify","html_url":"https://github.com/cloudify","followers_url":"https://api.github.com/users/cloudify/followers","following_url":"https://api.github.com/users/cloudify/following{/other_user}","gists_url":"https://api.github.com/users/cloudify/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify/subscriptions","organizations_url":"https://api.github.com/users/cloudify/orgs","repos_url":"https://api.github.com/users/cloudify/repos","events_url":"https://api.github.com/users/cloudify/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify/received_events","type":"User","site_admin":false},"body":"this class looks superfluous, get/values/keys can be implemented for any indexed type\r\n\r\nalso the `create` constructor could be just a method, e.g. `toIndexex<T, V extends<WIthId<T>>>(a: ReadonlyArray<V>): IndexedById<T, V> {...}`","created_at":"2018-06-12T14:30:29Z","updated_at":"2018-06-12T14:30:29Z","html_url":"https://github.com/teamdigitale/italia-app/pull/200#discussion_r194760698","pull_request_url":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/teamdigitale/italia-app/pulls/comments/194760698"},"html":{"href":"https://github.com/teamdigitale/italia-app/pull/200#discussion_r194760698"},"pull_request":{"href":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200"}}},"pull_request":{"url":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200","id":192353647,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMzUzNjQ3","html_url":"https://github.com/teamdigitale/italia-app/pull/200","diff_url":"https://github.com/teamdigitale/italia-app/pull/200.diff","patch_url":"https://github.com/teamdigitale/italia-app/pull/200.patch","issue_url":"https://api.github.com/repos/teamdigitale/italia-app/issues/200","number":200,"state":"open","locked":false,"title":"[#157962664] porting wallet to redux","user":{"login":"fgiobergia","id":107715,"node_id":"MDQ6VXNlcjEwNzcxNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/107715?v=4","gravatar_id":"","url":"https://api.github.com/users/fgiobergia","html_url":"https://github.com/fgiobergia","followers_url":"https://api.github.com/users/fgiobergia/followers","following_url":"https://api.github.com/users/fgiobergia/following{/other_user}","gists_url":"https://api.github.com/users/fgiobergia/gists{/gist_id}","starred_url":"https://api.github.com/users/fgiobergia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgiobergia/subscriptions","organizations_url":"https://api.github.com/users/fgiobergia/orgs","repos_url":"https://api.github.com/users/fgiobergia/repos","events_url":"https://api.github.com/users/fgiobergia/events{/privacy}","received_events_url":"https://api.github.com/users/fgiobergia/received_events","type":"User","site_admin":false},"body":"Porting the wallet to redux: when a credit card or transactions are selected, these are stored via redux rather than being passed directly as props. \r\n\r\nI added an initial saga which will then be updated so as to make the data fetching continuous\r\n\r\nNot really familiar with redux btw, feedback super appreciated!","created_at":"2018-06-04T09:49:30Z","updated_at":"2018-06-12T14:30:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"833e7eacc7fefb218145faa550c591f45412b30d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"gunzip","id":148224,"node_id":"MDQ6VXNlcjE0ODIyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/148224?v=4","gravatar_id":"","url":"https://api.github.com/users/gunzip","html_url":"https://github.com/gunzip","followers_url":"https://api.github.com/users/gunzip/followers","following_url":"https://api.github.com/users/gunzip/following{/other_user}","gists_url":"https://api.github.com/users/gunzip/gists{/gist_id}","starred_url":"https://api.github.com/users/gunzip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunzip/subscriptions","organizations_url":"https://api.github.com/users/gunzip/orgs","repos_url":"https://api.github.com/users/gunzip/repos","events_url":"https://api.github.com/users/gunzip/events{/privacy}","received_events_url":"https://api.github.com/users/gunzip/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200/commits","review_comments_url":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200/comments","review_comment_url":"https://api.github.com/repos/teamdigitale/italia-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/teamdigitale/italia-app/issues/200/comments","statuses_url":"https://api.github.com/repos/teamdigitale/italia-app/statuses/e6490dd80fcc658fda573abddd633f5f025cff84","head":{"label":"teamdigitale:157962664-porting-wallet-to-redux","ref":"157962664-porting-wallet-to-redux","sha":"e6490dd80fcc658fda573abddd633f5f025cff84","user":{"login":"teamdigitale","id":25081492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDgxNDky","avatar_url":"https://avatars0.githubusercontent.com/u/25081492?v=4","gravatar_id":"","url":"https://api.github.com/users/teamdigitale","html_url":"https://github.com/teamdigitale","followers_url":"https://api.github.com/users/teamdigitale/followers","following_url":"https://api.github.com/users/teamdigitale/following{/other_user}","gists_url":"https://api.github.com/users/teamdigitale/gists{/gist_id}","starred_url":"https://api.github.com/users/teamdigitale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamdigitale/subscriptions","organizations_url":"https://api.github.com/users/teamdigitale/orgs","repos_url":"https://api.github.com/users/teamdigitale/repos","events_url":"https://api.github.com/users/teamdigitale/events{/privacy}","received_events_url":"https://api.github.com/users/teamdigitale/received_events","type":"Organization","site_admin":false},"repo":{"id":87916228,"node_id":"MDEwOlJlcG9zaXRvcnk4NzkxNjIyOA==","name":"italia-app","full_name":"teamdigitale/italia-app","owner":{"login":"teamdigitale","id":25081492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDgxNDky","avatar_url":"https://avatars0.githubusercontent.com/u/25081492?v=4","gravatar_id":"","url":"https://api.github.com/users/teamdigitale","html_url":"https://github.com/teamdigitale","followers_url":"https://api.github.com/users/teamdigitale/followers","following_url":"https://api.github.com/users/teamdigitale/following{/other_user}","gists_url":"https://api.github.com/users/teamdigitale/gists{/gist_id}","starred_url":"https://api.github.com/users/teamdigitale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamdigitale/subscriptions","organizations_url":"https://api.github.com/users/teamdigitale/orgs","repos_url":"https://api.github.com/users/teamdigitale/repos","events_url":"https://api.github.com/users/teamdigitale/events{/privacy}","received_events_url":"https://api.github.com/users/teamdigitale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamdigitale/italia-app","description":"App della Cittadinanza Digitale (mobile)","fork":false,"url":"https://api.github.com/repos/teamdigitale/italia-app","forks_url":"https://api.github.com/repos/teamdigitale/italia-app/forks","keys_url":"https://api.github.com/repos/teamdigitale/italia-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamdigitale/italia-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamdigitale/italia-app/teams","hooks_url":"https://api.github.com/repos/teamdigitale/italia-app/hooks","issue_events_url":"https://api.github.com/repos/teamdigitale/italia-app/issues/events{/number}","events_url":"https://api.github.com/repos/teamdigitale/italia-app/events","assignees_url":"https://api.github.com/repos/teamdigitale/italia-app/assignees{/user}","branches_url":"https://api.github.com/repos/teamdigitale/italia-app/branches{/branch}","tags_url":"https://api.github.com/repos/teamdigitale/italia-app/tags","blobs_url":"https://api.github.com/repos/teamdigitale/italia-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamdigitale/italia-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamdigitale/italia-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamdigitale/italia-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamdigitale/italia-app/statuses/{sha}","languages_url":"https://api.github.com/repos/teamdigitale/italia-app/languages","stargazers_url":"https://api.github.com/repos/teamdigitale/italia-app/stargazers","contributors_url":"https://api.github.com/repos/teamdigitale/italia-app/contributors","subscribers_url":"https://api.github.com/repos/teamdigitale/italia-app/subscribers","subscription_url":"https://api.github.com/repos/teamdigitale/italia-app/subscription","commits_url":"https://api.github.com/repos/teamdigitale/italia-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamdigitale/italia-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamdigitale/italia-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamdigitale/italia-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamdigitale/italia-app/contents/{+path}","compare_url":"https://api.github.com/repos/teamdigitale/italia-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamdigitale/italia-app/merges","archive_url":"https://api.github.com/repos/teamdigitale/italia-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamdigitale/italia-app/downloads","issues_url":"https://api.github.com/repos/teamdigitale/italia-app/issues{/number}","pulls_url":"https://api.github.com/repos/teamdigitale/italia-app/pulls{/number}","milestones_url":"https://api.github.com/repos/teamdigitale/italia-app/milestones{/number}","notifications_url":"https://api.github.com/repos/teamdigitale/italia-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamdigitale/italia-app/labels{/name}","releases_url":"https://api.github.com/repos/teamdigitale/italia-app/releases{/id}","deployments_url":"https://api.github.com/repos/teamdigitale/italia-app/deployments","created_at":"2017-04-11T09:34:46Z","updated_at":"2018-06-12T12:39:35Z","pushed_at":"2018-06-12T14:03:14Z","git_url":"git://github.com/teamdigitale/italia-app.git","ssh_url":"git@github.com:teamdigitale/italia-app.git","clone_url":"https://github.com/teamdigitale/italia-app.git","svn_url":"https://github.com/teamdigitale/italia-app","homepage":"","size":18369,"stargazers_count":54,"watchers_count":54,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":12,"watchers":54,"default_branch":"master"}},"base":{"label":"teamdigitale:master","ref":"master","sha":"08ab5664c0d9a2ab1981f232737d4212aa36284a","user":{"login":"teamdigitale","id":25081492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDgxNDky","avatar_url":"https://avatars0.githubusercontent.com/u/25081492?v=4","gravatar_id":"","url":"https://api.github.com/users/teamdigitale","html_url":"https://github.com/teamdigitale","followers_url":"https://api.github.com/users/teamdigitale/followers","following_url":"https://api.github.com/users/teamdigitale/following{/other_user}","gists_url":"https://api.github.com/users/teamdigitale/gists{/gist_id}","starred_url":"https://api.github.com/users/teamdigitale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamdigitale/subscriptions","organizations_url":"https://api.github.com/users/teamdigitale/orgs","repos_url":"https://api.github.com/users/teamdigitale/repos","events_url":"https://api.github.com/users/teamdigitale/events{/privacy}","received_events_url":"https://api.github.com/users/teamdigitale/received_events","type":"Organization","site_admin":false},"repo":{"id":87916228,"node_id":"MDEwOlJlcG9zaXRvcnk4NzkxNjIyOA==","name":"italia-app","full_name":"teamdigitale/italia-app","owner":{"login":"teamdigitale","id":25081492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDgxNDky","avatar_url":"https://avatars0.githubusercontent.com/u/25081492?v=4","gravatar_id":"","url":"https://api.github.com/users/teamdigitale","html_url":"https://github.com/teamdigitale","followers_url":"https://api.github.com/users/teamdigitale/followers","following_url":"https://api.github.com/users/teamdigitale/following{/other_user}","gists_url":"https://api.github.com/users/teamdigitale/gists{/gist_id}","starred_url":"https://api.github.com/users/teamdigitale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teamdigitale/subscriptions","organizations_url":"https://api.github.com/users/teamdigitale/orgs","repos_url":"https://api.github.com/users/teamdigitale/repos","events_url":"https://api.github.com/users/teamdigitale/events{/privacy}","received_events_url":"https://api.github.com/users/teamdigitale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/teamdigitale/italia-app","description":"App della Cittadinanza Digitale (mobile)","fork":false,"url":"https://api.github.com/repos/teamdigitale/italia-app","forks_url":"https://api.github.com/repos/teamdigitale/italia-app/forks","keys_url":"https://api.github.com/repos/teamdigitale/italia-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/teamdigitale/italia-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/teamdigitale/italia-app/teams","hooks_url":"https://api.github.com/repos/teamdigitale/italia-app/hooks","issue_events_url":"https://api.github.com/repos/teamdigitale/italia-app/issues/events{/number}","events_url":"https://api.github.com/repos/teamdigitale/italia-app/events","assignees_url":"https://api.github.com/repos/teamdigitale/italia-app/assignees{/user}","branches_url":"https://api.github.com/repos/teamdigitale/italia-app/branches{/branch}","tags_url":"https://api.github.com/repos/teamdigitale/italia-app/tags","blobs_url":"https://api.github.com/repos/teamdigitale/italia-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/teamdigitale/italia-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/teamdigitale/italia-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/teamdigitale/italia-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/teamdigitale/italia-app/statuses/{sha}","languages_url":"https://api.github.com/repos/teamdigitale/italia-app/languages","stargazers_url":"https://api.github.com/repos/teamdigitale/italia-app/stargazers","contributors_url":"https://api.github.com/repos/teamdigitale/italia-app/contributors","subscribers_url":"https://api.github.com/repos/teamdigitale/italia-app/subscribers","subscription_url":"https://api.github.com/repos/teamdigitale/italia-app/subscription","commits_url":"https://api.github.com/repos/teamdigitale/italia-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/teamdigitale/italia-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/teamdigitale/italia-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/teamdigitale/italia-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/teamdigitale/italia-app/contents/{+path}","compare_url":"https://api.github.com/repos/teamdigitale/italia-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/teamdigitale/italia-app/merges","archive_url":"https://api.github.com/repos/teamdigitale/italia-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/teamdigitale/italia-app/downloads","issues_url":"https://api.github.com/repos/teamdigitale/italia-app/issues{/number}","pulls_url":"https://api.github.com/repos/teamdigitale/italia-app/pulls{/number}","milestones_url":"https://api.github.com/repos/teamdigitale/italia-app/milestones{/number}","notifications_url":"https://api.github.com/repos/teamdigitale/italia-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/teamdigitale/italia-app/labels{/name}","releases_url":"https://api.github.com/repos/teamdigitale/italia-app/releases{/id}","deployments_url":"https://api.github.com/repos/teamdigitale/italia-app/deployments","created_at":"2017-04-11T09:34:46Z","updated_at":"2018-06-12T12:39:35Z","pushed_at":"2018-06-12T14:03:14Z","git_url":"git://github.com/teamdigitale/italia-app.git","ssh_url":"git@github.com:teamdigitale/italia-app.git","clone_url":"https://github.com/teamdigitale/italia-app.git","svn_url":"https://github.com/teamdigitale/italia-app","homepage":"","size":18369,"stargazers_count":54,"watchers_count":54,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":7,"open_issues":12,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200"},"html":{"href":"https://github.com/teamdigitale/italia-app/pull/200"},"issue":{"href":"https://api.github.com/repos/teamdigitale/italia-app/issues/200"},"comments":{"href":"https://api.github.com/repos/teamdigitale/italia-app/issues/200/comments"},"review_comments":{"href":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200/comments"},"review_comment":{"href":"https://api.github.com/repos/teamdigitale/italia-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/teamdigitale/italia-app/pulls/200/commits"},"statuses":{"href":"https://api.github.com/repos/teamdigitale/italia-app/statuses/e6490dd80fcc658fda573abddd633f5f025cff84"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"cloudify"}}