{"action":"created","comment":{"url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/comments/225280285","pull_request_review_id":164849597,"id":225280285,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTI4MDI4NQ==","diff_hunk":"@@ -40,22 +45,53 @@ class RecoverWalletActivity : BaseActivity() {\n     override fun setupUI() {\n         setupToolbar()\n \n+        if (isRecoveryPhrase) {\n+            secretKeyEditText.visibility = View.GONE\n+            phraseEditText.visibility = View.VISIBLE\n+            invalidPhraseTextView.text = getString(R.string.invalid_input_for_phrase)\n+        } else {\n+            secretKeyEditText.visibility = View.VISIBLE\n+            phraseEditText.visibility = View.GONE\n+            invalidPhraseTextView.text = getString(R.string.invalid_input_for_secret)\n+        }\n+\n         nextButton.setOnClickListener {\n-            val wordCount = getWordCount(getMnemonicString())\n-            if (wordCount == 12 || wordCount == 24) {\n-                launchPINView(PinType.CREATE,\n-                        getString(R.string.please_create_a_pin),\n-                        getMnemonicString(),\n-                        false)\n+            val recoveryString = getMnemonicString()\n+            val wordCount = getWordCount(recoveryString)\n+\n+            WalletApplication.localStore!!.isRecoveryPhrase = isRecoveryPhrase\n+\n+            if (isRecoveryPhrase) {","path":"app/src/main/java/blockeq/com/stellarwallet/activities/RecoverWalletActivity.kt","position":49,"original_position":49,"commit_id":"57d970e595c313a1309692562c32fe4626410d0d","original_commit_id":"57d970e595c313a1309692562c32fe4626410d0d","user":{"login":"Daniel-Wang","id":2541326,"node_id":"MDQ6VXNlcjI1NDEzMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/2541326?v=4","gravatar_id":"","url":"https://api.github.com/users/Daniel-Wang","html_url":"https://github.com/Daniel-Wang","followers_url":"https://api.github.com/users/Daniel-Wang/followers","following_url":"https://api.github.com/users/Daniel-Wang/following{/other_user}","gists_url":"https://api.github.com/users/Daniel-Wang/gists{/gist_id}","starred_url":"https://api.github.com/users/Daniel-Wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daniel-Wang/subscriptions","organizations_url":"https://api.github.com/users/Daniel-Wang/orgs","repos_url":"https://api.github.com/users/Daniel-Wang/repos","events_url":"https://api.github.com/users/Daniel-Wang/events{/privacy}","received_events_url":"https://api.github.com/users/Daniel-Wang/received_events","type":"User","site_admin":false},"body":"I could simplify this logic more but I think it's more readable this way?","created_at":"2018-10-15T18:59:05Z","updated_at":"2018-10-15T18:59:05Z","html_url":"https://github.com/Block-Equity/stellar-android-wallet/pull/45#discussion_r225280285","pull_request_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/comments/225280285"},"html":{"href":"https://github.com/Block-Equity/stellar-android-wallet/pull/45#discussion_r225280285"},"pull_request":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45","id":223008444,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMDA4NDQ0","html_url":"https://github.com/Block-Equity/stellar-android-wallet/pull/45","diff_url":"https://github.com/Block-Equity/stellar-android-wallet/pull/45.diff","patch_url":"https://github.com/Block-Equity/stellar-android-wallet/pull/45.patch","issue_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/45","number":45,"state":"open","locked":false,"title":"Import secret seed","user":{"login":"Daniel-Wang","id":2541326,"node_id":"MDQ6VXNlcjI1NDEzMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/2541326?v=4","gravatar_id":"","url":"https://api.github.com/users/Daniel-Wang","html_url":"https://github.com/Daniel-Wang","followers_url":"https://api.github.com/users/Daniel-Wang/followers","following_url":"https://api.github.com/users/Daniel-Wang/following{/other_user}","gists_url":"https://api.github.com/users/Daniel-Wang/gists{/gist_id}","starred_url":"https://api.github.com/users/Daniel-Wang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daniel-Wang/subscriptions","organizations_url":"https://api.github.com/users/Daniel-Wang/orgs","repos_url":"https://api.github.com/users/Daniel-Wang/repos","events_url":"https://api.github.com/users/Daniel-Wang/events{/privacy}","received_events_url":"https://api.github.com/users/Daniel-Wang/received_events","type":"User","site_admin":false},"body":"## Priority\r\nUrgent 👍 \r\n\r\n## Description\r\n* Enables user to import a wallet with their secret seed\r\n* Refactored PIN Activity to enable generating keypair via phrase or seed based on which is used\r\n* Added a local store property for `isRecoveryPhrase` to indicate whether a phrase or seed is used\r\n* Refactored `get` method names in local store to indicate getString or getBoolean (can't overload it :( )\r\n\r\n## Screenshot\r\n\r\n(Highlights UI changes)\r\n\r\nWhen showing phrase from a secret seed generated account\r\n\r\n![screenshot_20181015-145323](https://user-images.githubusercontent.com/2541326/46971647-90e82f80-d08a-11e8-8ba0-1dacc844827a.png)\r\n\r\nAdded new dialog\r\n\r\n![screenshot_20181015-145342](https://user-images.githubusercontent.com/2541326/46971645-8f1e6c00-d08a-11e8-8037-671cdd24ab14.png)\r\n","created_at":"2018-10-15T18:57:49Z","updated_at":"2018-10-15T18:59:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5747f3923e6e77212edc3625d2efe801b75325d9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45/commits","review_comments_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45/comments","review_comment_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/45/comments","statuses_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/statuses/57d970e595c313a1309692562c32fe4626410d0d","head":{"label":"Block-Equity:importSecretSeed","ref":"importSecretSeed","sha":"57d970e595c313a1309692562c32fe4626410d0d","user":{"login":"Block-Equity","id":36420670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDIwNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/36420670?v=4","gravatar_id":"","url":"https://api.github.com/users/Block-Equity","html_url":"https://github.com/Block-Equity","followers_url":"https://api.github.com/users/Block-Equity/followers","following_url":"https://api.github.com/users/Block-Equity/following{/other_user}","gists_url":"https://api.github.com/users/Block-Equity/gists{/gist_id}","starred_url":"https://api.github.com/users/Block-Equity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block-Equity/subscriptions","organizations_url":"https://api.github.com/users/Block-Equity/orgs","repos_url":"https://api.github.com/users/Block-Equity/repos","events_url":"https://api.github.com/users/Block-Equity/events{/privacy}","received_events_url":"https://api.github.com/users/Block-Equity/received_events","type":"Organization","site_admin":false},"repo":{"id":128590362,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg1OTAzNjI=","name":"stellar-android-wallet","full_name":"Block-Equity/stellar-android-wallet","private":false,"owner":{"login":"Block-Equity","id":36420670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDIwNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/36420670?v=4","gravatar_id":"","url":"https://api.github.com/users/Block-Equity","html_url":"https://github.com/Block-Equity","followers_url":"https://api.github.com/users/Block-Equity/followers","following_url":"https://api.github.com/users/Block-Equity/following{/other_user}","gists_url":"https://api.github.com/users/Block-Equity/gists{/gist_id}","starred_url":"https://api.github.com/users/Block-Equity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block-Equity/subscriptions","organizations_url":"https://api.github.com/users/Block-Equity/orgs","repos_url":"https://api.github.com/users/Block-Equity/repos","events_url":"https://api.github.com/users/Block-Equity/events{/privacy}","received_events_url":"https://api.github.com/users/Block-Equity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Block-Equity/stellar-android-wallet","description":"An open source Android wallet for Stellar.","fork":false,"url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet","forks_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/forks","keys_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/teams","hooks_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/hooks","issue_events_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/events{/number}","events_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/events","assignees_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/assignees{/user}","branches_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/branches{/branch}","tags_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/tags","blobs_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/statuses/{sha}","languages_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/languages","stargazers_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/stargazers","contributors_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/contributors","subscribers_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/subscribers","subscription_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/subscription","commits_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/contents/{+path}","compare_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/merges","archive_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/downloads","issues_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues{/number}","pulls_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls{/number}","milestones_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/milestones{/number}","notifications_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/labels{/name}","releases_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/releases{/id}","deployments_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/deployments","created_at":"2018-04-08T02:49:58Z","updated_at":"2018-10-12T19:52:31Z","pushed_at":"2018-10-15T18:57:50Z","git_url":"git://github.com/Block-Equity/stellar-android-wallet.git","ssh_url":"git@github.com:Block-Equity/stellar-android-wallet.git","clone_url":"https://github.com/Block-Equity/stellar-android-wallet.git","svn_url":"https://github.com/Block-Equity/stellar-android-wallet","homepage":"https://www.blockeq.com","size":15305,"stargazers_count":9,"watchers_count":9,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":2,"watchers":9,"default_branch":"dev"}},"base":{"label":"Block-Equity:dev","ref":"dev","sha":"37a219a4bf2856347b800360454ac4f132bb162c","user":{"login":"Block-Equity","id":36420670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDIwNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/36420670?v=4","gravatar_id":"","url":"https://api.github.com/users/Block-Equity","html_url":"https://github.com/Block-Equity","followers_url":"https://api.github.com/users/Block-Equity/followers","following_url":"https://api.github.com/users/Block-Equity/following{/other_user}","gists_url":"https://api.github.com/users/Block-Equity/gists{/gist_id}","starred_url":"https://api.github.com/users/Block-Equity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block-Equity/subscriptions","organizations_url":"https://api.github.com/users/Block-Equity/orgs","repos_url":"https://api.github.com/users/Block-Equity/repos","events_url":"https://api.github.com/users/Block-Equity/events{/privacy}","received_events_url":"https://api.github.com/users/Block-Equity/received_events","type":"Organization","site_admin":false},"repo":{"id":128590362,"node_id":"MDEwOlJlcG9zaXRvcnkxMjg1OTAzNjI=","name":"stellar-android-wallet","full_name":"Block-Equity/stellar-android-wallet","private":false,"owner":{"login":"Block-Equity","id":36420670,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NDIwNjcw","avatar_url":"https://avatars1.githubusercontent.com/u/36420670?v=4","gravatar_id":"","url":"https://api.github.com/users/Block-Equity","html_url":"https://github.com/Block-Equity","followers_url":"https://api.github.com/users/Block-Equity/followers","following_url":"https://api.github.com/users/Block-Equity/following{/other_user}","gists_url":"https://api.github.com/users/Block-Equity/gists{/gist_id}","starred_url":"https://api.github.com/users/Block-Equity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Block-Equity/subscriptions","organizations_url":"https://api.github.com/users/Block-Equity/orgs","repos_url":"https://api.github.com/users/Block-Equity/repos","events_url":"https://api.github.com/users/Block-Equity/events{/privacy}","received_events_url":"https://api.github.com/users/Block-Equity/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Block-Equity/stellar-android-wallet","description":"An open source Android wallet for Stellar.","fork":false,"url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet","forks_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/forks","keys_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/teams","hooks_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/hooks","issue_events_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/events{/number}","events_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/events","assignees_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/assignees{/user}","branches_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/branches{/branch}","tags_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/tags","blobs_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/statuses/{sha}","languages_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/languages","stargazers_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/stargazers","contributors_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/contributors","subscribers_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/subscribers","subscription_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/subscription","commits_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/contents/{+path}","compare_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/merges","archive_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/downloads","issues_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues{/number}","pulls_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls{/number}","milestones_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/milestones{/number}","notifications_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/labels{/name}","releases_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/releases{/id}","deployments_url":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/deployments","created_at":"2018-04-08T02:49:58Z","updated_at":"2018-10-12T19:52:31Z","pushed_at":"2018-10-15T18:57:50Z","git_url":"git://github.com/Block-Equity/stellar-android-wallet.git","ssh_url":"git@github.com:Block-Equity/stellar-android-wallet.git","clone_url":"https://github.com/Block-Equity/stellar-android-wallet.git","svn_url":"https://github.com/Block-Equity/stellar-android-wallet","homepage":"https://www.blockeq.com","size":15305,"stargazers_count":9,"watchers_count":9,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":2,"watchers":9,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45"},"html":{"href":"https://github.com/Block-Equity/stellar-android-wallet/pull/45"},"issue":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/45"},"comments":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/Block-Equity/stellar-android-wallet/statuses/57d970e595c313a1309692562c32fe4626410d0d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Daniel-Wang"}}