{"action":"closed","issue":{"url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1579","repository_url":"https://api.github.com/repos/bitcoinj/bitcoinj","labels_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1579/comments","events_url":"https://api.github.com/repos/bitcoinj/bitcoinj/issues/1579/events","html_url":"https://github.com/bitcoinj/bitcoinj/issues/1579","id":322297535,"number":1579,"title":"Restore From Seed Issue","user":{"login":"KaushikTechcronus","id":35837549,"avatar_url":"https://avatars2.githubusercontent.com/u/35837549?v=4","gravatar_id":"","url":"https://api.github.com/users/KaushikTechcronus","html_url":"https://github.com/KaushikTechcronus","followers_url":"https://api.github.com/users/KaushikTechcronus/followers","following_url":"https://api.github.com/users/KaushikTechcronus/following{/other_user}","gists_url":"https://api.github.com/users/KaushikTechcronus/gists{/gist_id}","starred_url":"https://api.github.com/users/KaushikTechcronus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaushikTechcronus/subscriptions","organizations_url":"https://api.github.com/users/KaushikTechcronus/orgs","repos_url":"https://api.github.com/users/KaushikTechcronus/repos","events_url":"https://api.github.com/users/KaushikTechcronus/events{/privacy}","received_events_url":"https://api.github.com/users/KaushikTechcronus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-11T13:30:09Z","updated_at":"2018-05-15T11:27:49Z","closed_at":"2018-05-15T11:27:48Z","author_association":"NONE","body":"```\r\nLog.print(\"Seeds:: \" + Pref.getValue(activity, Config.PREF_WORDLIST, \"\"));\r\n            String[] splitComma = Pref.getValue(activity, Config.PREF_WORDLIST, \"\").split(\",\");\r\n            String seed = \"\";\r\n            for (int i = 0; i < splitComma.length; i++) {\r\n                String seedData;\r\n                if (i == 0) {\r\n                    seedData = splitComma[i].substring(1);\r\n                } else if (i == splitComma.length - 1) {\r\n                    seedData = splitComma[i].substring(0, splitComma[i].length() - 1);\r\n                } else {\r\n                    seedData = splitComma[i];\r\n                }\r\n                seed = seed.concat(seedData);\r\n            }\r\n            Log.print(\"Seed String:: \" + seed);\r\n            String seedCode = seed;\r\n            String passphrase = \"\";\r\n            Long creationtime = 1409478661L;\r\n\r\n            DeterministicSeed deterministicSeed = new DeterministicSeed(seedCode, null, passphrase, creationtime);\r\n            Wallet wallet = Wallet.fromSeed(Constants.NETWORK_PARAMETERS, deterministicSeed);\r\n            android.util.Log.e(WalletFragment.class.getSimpleName(), \"Wallet:: \" + wallet);\r\n            android.util.Log.e(WalletFragment.class.getSimpleName(), \"Wallet Address:: \" + wallet.currentReceiveAddress());\r\n            android.util.Log.e(WalletFragment.class.getSimpleName(), \"Wallet Balance:: \" + wallet.getBalance(Wallet.BalanceType.AVAILABLE));\r\n\r\n            wallet.clearTransactions(0);\r\n\r\n            File root;\r\n            File file = null;\r\n\r\n            if (!checkPermissionStorage()) {\r\n                showPermissionDialogStorage();\r\n            } else {\r\n//                shareData();\r\n                root = new File(Environment.getExternalStorageDirectory(), \"BTCX\");\r\n                if (!root.exists()) {\r\n                    root.mkdirs();\r\n                }\r\n                file = new File(root, \"restore-from-seed.spvchain\");\r\n                file.createNewFile();\r\n            }\r\n\r\n            File chainFile = new File(file.getPath());\r\n            if (chainFile.exists()) {\r\n                chainFile.delete();\r\n            }\r\n\r\n            SPVBlockStore chainStore = new SPVBlockStore(Constants.NETWORK_PARAMETERS, chainFile);\r\n            BlockChain chain = new BlockChain(Constants.NETWORK_PARAMETERS, chainStore);\r\n            PeerGroup peerGroup = new PeerGroup(Constants.NETWORK_PARAMETERS, chain);\r\n            peerGroup.addPeerDiscovery(new DnsDiscovery(Constants.NETWORK_PARAMETERS));\r\n\r\n            chain.addWallet(wallet);\r\n            peerGroup.addWallet(wallet);\r\n\r\n            DownloadProgressTracker bListener = new DownloadProgressTracker() {\r\n                @Override\r\n                public void doneDownload() {\r\n                    System.out.println(\"blockchain downloaded\");\r\n                }\r\n            };\r\n\r\n            peerGroup.start();\r\n            peerGroup.startBlockChainDownload(bListener);\r\n\r\n            bListener.await();\r\n\r\n            DisplayContent.showLogE(TAG, \"Updated Wallet:: \" + wallet);\r\n\r\n            peerGroup.stop();\r\n```\r\nI've implemented this but I got 0 index address and only 0.275 balance as it comes from faucet.\r\nBut as I made transactions my address is changed because bitcoin supports multi address.\r\nSo is there any way to get all balance??\r\n\r\nPlease help me with this."}}
{"actor":{"display_login":"schildbach"}}