{"action":"created","comment":{"url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/comments/214046985","pull_request_review_id":151013852,"id":214046985,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDA0Njk4NQ==","diff_hunk":"@@ -52,7 +54,29 @@ struct ExchangeServices: ExchangeDependencies {\n     private var exchangeViewController: PartnerExchangeListViewController?\n     private var rootViewController: UIViewController?\n \n+    // MARK: - Entry Point\n+\n     func start() {\n+        if let theUser = user, theUser.status == .approved {\n+            launchExchangeOrHomebrew(); return\n+        }\n+        disposable = BlockchainDataRepository.shared.kycUser\n+            .subscribeOn(MainScheduler.asyncInstance)\n+            .observeOn(MainScheduler.instance)\n+            .subscribe(onSuccess: { [unowned self] in\n+                self.user = $0\n+                guard self.user?.status == .approved else {\n+                    KYCCoordinator.shared.start(); return\n+                }\n+                self.launchExchangeOrHomebrew()\n+                Logger.shared.debug(\"Got user with ID: \\($0.personalDetails?.identifier ?? \"\")\")\n+                }, onError: { error in","path":"Blockchain/Coordinators/ExchangeCoordinator.swift","position":29,"original_position":29,"commit_id":"76ee3afa0f0d4593d36ef527402c5aa7bfd98f0d","original_commit_id":"76ee3afa0f0d4593d36ef527402c5aa7bfd98f0d","user":{"login":"woudini","id":10579422,"node_id":"MDQ6VXNlcjEwNTc5NDIy","avatar_url":"https://avatars1.githubusercontent.com/u/10579422?v=4","gravatar_id":"","url":"https://api.github.com/users/woudini","html_url":"https://github.com/woudini","followers_url":"https://api.github.com/users/woudini/followers","following_url":"https://api.github.com/users/woudini/following{/other_user}","gists_url":"https://api.github.com/users/woudini/gists{/gist_id}","starred_url":"https://api.github.com/users/woudini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/woudini/subscriptions","organizations_url":"https://api.github.com/users/woudini/orgs","repos_url":"https://api.github.com/users/woudini/repos","events_url":"https://api.github.com/users/woudini/events{/privacy}","received_events_url":"https://api.github.com/users/woudini/received_events","type":"User","site_admin":false},"body":"Nit: reverse indent lines 73-75 for readability","created_at":"2018-08-30T14:13:02Z","updated_at":"2018-08-30T14:26:38Z","html_url":"https://github.com/blockchain/My-Wallet-V3-iOS/pull/443#discussion_r214046985","pull_request_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/comments/214046985"},"html":{"href":"https://github.com/blockchain/My-Wallet-V3-iOS/pull/443#discussion_r214046985"},"pull_request":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443"}}},"pull_request":{"url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443","id":211850735,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExODUwNzM1","html_url":"https://github.com/blockchain/My-Wallet-V3-iOS/pull/443","diff_url":"https://github.com/blockchain/My-Wallet-V3-iOS/pull/443.diff","patch_url":"https://github.com/blockchain/My-Wallet-V3-iOS/pull/443.patch","issue_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/443","number":443,"state":"open","locked":false,"title":"feat(KYC): IOS-1161 move KYC responsibility to Exchange coordinator","user":{"login":"achtenhagen","id":14079155,"node_id":"MDQ6VXNlcjE0MDc5MTU1","avatar_url":"https://avatars0.githubusercontent.com/u/14079155?v=4","gravatar_id":"","url":"https://api.github.com/users/achtenhagen","html_url":"https://github.com/achtenhagen","followers_url":"https://api.github.com/users/achtenhagen/followers","following_url":"https://api.github.com/users/achtenhagen/following{/other_user}","gists_url":"https://api.github.com/users/achtenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/achtenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achtenhagen/subscriptions","organizations_url":"https://api.github.com/users/achtenhagen/orgs","repos_url":"https://api.github.com/users/achtenhagen/repos","events_url":"https://api.github.com/users/achtenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/achtenhagen/received_events","type":"User","site_admin":false},"body":"## Objective\r\n\r\nMove the responsibility of whether or not the KYC flow or the exchange flow should be started to the ExchangeCoordinator.\r\n\r\n## Description\r\n\r\nMigrated the KYC flow logic to the Exchange coordinator and made the KYC coordinator a singleton.\r\n\r\n## How to Test\r\n\r\nWhile in the `dev` environment, tap on the `Exchange` item in the sidebar. Observe that the KYC flow is initialized for a user with an account status of unverified. Then observe that the exchange flow is started for a user with an account status of verified.\r\n\r\n## Merge Checklist\r\n\r\n- [x] The PR uses a title supported by [.changelogrc](https://github.com/blockchain/My-Wallet-V3-iOS/blob/dev/.changelogrc#L6...L69).\r\n- [x] Areas of technical debt are marked with a `// TICKET:` comment that includes a ticket number.\r\n- [x] All unit tests pass.\r\n- [ ] You have added unit tests.\r\n- [x] New files added are within the correct directory. (e.g. if a file is required for unit tests to compile, be sure it is added to the tests target.)\r\n","created_at":"2018-08-29T18:46:33Z","updated_at":"2018-08-30T14:26:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aba5be405027a44ccbea9b24c2ca60b22e3596a9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1010627324,"node_id":"MDU6TGFiZWwxMDEwNjI3MzI0","url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/labels/Ready%20for%20Review","name":"Ready for Review","color":"037c3c","default":false},{"id":810245474,"node_id":"MDU6TGFiZWw4MTAyNDU0NzQ=","url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/labels/don't%20merge%20yet","name":"don't merge yet","color":"d83f24","default":false},{"id":911818453,"node_id":"MDU6TGFiZWw5MTE4MTg0NTM=","url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/labels/feedback-needed","name":"feedback-needed","color":"e99695","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443/commits","review_comments_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443/comments","review_comment_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/443/comments","statuses_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/statuses/76ee3afa0f0d4593d36ef527402c5aa7bfd98f0d","head":{"label":"blockchain:maurice/ios-1161/kyc-exchange","ref":"maurice/ios-1161/kyc-exchange","sha":"76ee3afa0f0d4593d36ef527402c5aa7bfd98f0d","user":{"login":"blockchain","id":1777722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzc3MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1777722?v=4","gravatar_id":"","url":"https://api.github.com/users/blockchain","html_url":"https://github.com/blockchain","followers_url":"https://api.github.com/users/blockchain/followers","following_url":"https://api.github.com/users/blockchain/following{/other_user}","gists_url":"https://api.github.com/users/blockchain/gists{/gist_id}","starred_url":"https://api.github.com/users/blockchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockchain/subscriptions","organizations_url":"https://api.github.com/users/blockchain/orgs","repos_url":"https://api.github.com/users/blockchain/repos","events_url":"https://api.github.com/users/blockchain/events{/privacy}","received_events_url":"https://api.github.com/users/blockchain/received_events","type":"Organization","site_admin":false},"repo":{"id":26277947,"node_id":"MDEwOlJlcG9zaXRvcnkyNjI3Nzk0Nw==","name":"My-Wallet-V3-iOS","full_name":"blockchain/My-Wallet-V3-iOS","owner":{"login":"blockchain","id":1777722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzc3MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1777722?v=4","gravatar_id":"","url":"https://api.github.com/users/blockchain","html_url":"https://github.com/blockchain","followers_url":"https://api.github.com/users/blockchain/followers","following_url":"https://api.github.com/users/blockchain/following{/other_user}","gists_url":"https://api.github.com/users/blockchain/gists{/gist_id}","starred_url":"https://api.github.com/users/blockchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockchain/subscriptions","organizations_url":"https://api.github.com/users/blockchain/orgs","repos_url":"https://api.github.com/users/blockchain/repos","events_url":"https://api.github.com/users/blockchain/events{/privacy}","received_events_url":"https://api.github.com/users/blockchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blockchain/My-Wallet-V3-iOS","description":"Blockchain iOS Wallet","fork":false,"url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS","forks_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/forks","keys_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/teams","hooks_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/hooks","issue_events_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/events","assignees_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/tags","blobs_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/languages","stargazers_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/stargazers","contributors_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/contributors","subscribers_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/subscribers","subscription_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/subscription","commits_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/merges","archive_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/downloads","issues_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/labels{/name}","releases_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/deployments","created_at":"2014-11-06T16:07:58Z","updated_at":"2018-08-30T13:41:26Z","pushed_at":"2018-08-30T14:03:27Z","git_url":"git://github.com/blockchain/My-Wallet-V3-iOS.git","ssh_url":"git@github.com:blockchain/My-Wallet-V3-iOS.git","clone_url":"https://github.com/blockchain/My-Wallet-V3-iOS.git","svn_url":"https://github.com/blockchain/My-Wallet-V3-iOS","homepage":"https://itunes.apple.com/us/app/blockchain-bitcoin-wallet/id493253309","size":90612,"stargazers_count":93,"watchers_count":93,"language":"Assembly","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":63,"open_issues":9,"watchers":93,"default_branch":"dev"}},"base":{"label":"blockchain:dev","ref":"dev","sha":"9ad265ec6fe7e58cff287642a189fa48acb602af","user":{"login":"blockchain","id":1777722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzc3MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1777722?v=4","gravatar_id":"","url":"https://api.github.com/users/blockchain","html_url":"https://github.com/blockchain","followers_url":"https://api.github.com/users/blockchain/followers","following_url":"https://api.github.com/users/blockchain/following{/other_user}","gists_url":"https://api.github.com/users/blockchain/gists{/gist_id}","starred_url":"https://api.github.com/users/blockchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockchain/subscriptions","organizations_url":"https://api.github.com/users/blockchain/orgs","repos_url":"https://api.github.com/users/blockchain/repos","events_url":"https://api.github.com/users/blockchain/events{/privacy}","received_events_url":"https://api.github.com/users/blockchain/received_events","type":"Organization","site_admin":false},"repo":{"id":26277947,"node_id":"MDEwOlJlcG9zaXRvcnkyNjI3Nzk0Nw==","name":"My-Wallet-V3-iOS","full_name":"blockchain/My-Wallet-V3-iOS","owner":{"login":"blockchain","id":1777722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3Nzc3MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/1777722?v=4","gravatar_id":"","url":"https://api.github.com/users/blockchain","html_url":"https://github.com/blockchain","followers_url":"https://api.github.com/users/blockchain/followers","following_url":"https://api.github.com/users/blockchain/following{/other_user}","gists_url":"https://api.github.com/users/blockchain/gists{/gist_id}","starred_url":"https://api.github.com/users/blockchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blockchain/subscriptions","organizations_url":"https://api.github.com/users/blockchain/orgs","repos_url":"https://api.github.com/users/blockchain/repos","events_url":"https://api.github.com/users/blockchain/events{/privacy}","received_events_url":"https://api.github.com/users/blockchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blockchain/My-Wallet-V3-iOS","description":"Blockchain iOS Wallet","fork":false,"url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS","forks_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/forks","keys_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/teams","hooks_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/hooks","issue_events_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/events","assignees_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/tags","blobs_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/languages","stargazers_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/stargazers","contributors_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/contributors","subscribers_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/subscribers","subscription_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/subscription","commits_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/merges","archive_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/downloads","issues_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/labels{/name}","releases_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/deployments","created_at":"2014-11-06T16:07:58Z","updated_at":"2018-08-30T13:41:26Z","pushed_at":"2018-08-30T14:03:27Z","git_url":"git://github.com/blockchain/My-Wallet-V3-iOS.git","ssh_url":"git@github.com:blockchain/My-Wallet-V3-iOS.git","clone_url":"https://github.com/blockchain/My-Wallet-V3-iOS.git","svn_url":"https://github.com/blockchain/My-Wallet-V3-iOS","homepage":"https://itunes.apple.com/us/app/blockchain-bitcoin-wallet/id493253309","size":90612,"stargazers_count":93,"watchers_count":93,"language":"Assembly","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":63,"open_issues":9,"watchers":93,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443"},"html":{"href":"https://github.com/blockchain/My-Wallet-V3-iOS/pull/443"},"issue":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/443"},"comments":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/issues/443/comments"},"review_comments":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443/comments"},"review_comment":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/pulls/443/commits"},"statuses":{"href":"https://api.github.com/repos/blockchain/My-Wallet-V3-iOS/statuses/76ee3afa0f0d4593d36ef527402c5aa7bfd98f0d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"woudini"}}