I am creating android dapp for votings I am trying to check if user's credentials are right,so i use object of PersonalUnlockAccount class and function accountUnlocked().So the problem is that when i call accountUnlocked() it gets me to the first activity and returns nothing Here is the code

PersonalUnlockAccount personalUnlockAccount = null;
                personalUnlockAccount = web3.personalUnlockAccount(editTextAdress.
                        getText().toString(), editTextPassword.getText().toString()).sendAsync().get();
            if (personalUnlockAccount.accountUnlocked()) {
                ECKeyPair ecKeyPair = null;
                    ecKeyPair = Keys.createEcKeyPair();
                WalletUtils.generateWalletFile(editTextPassword.getText().toString(),ecKeyPair, new File(getCacheDir(),"wallet"), false);
                Log.i(TAG,"ne Rabotaet");                   Toast.makeText(getApplicationContext(),"PROBLEM",Toast.LENGTH_LONG).show();

What could be done with this?

  • unlock is bad, if you want to test if the user has the private key, make him sign something for you and check if the signature is valid – Majd TL Jun 3 '19 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.