In the import seed window ask before import the account
This commit is contained in:
parent
3c0e2058bb
commit
e24b355281
1 changed files with 52 additions and 30 deletions
|
@ -16,12 +16,19 @@ import android.widget.Toast;
|
|||
|
||||
import com.thekhaeng.pushdownanim.PushDownAnim;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnTextChanged;
|
||||
import cy.agorise.crystalwallet.R;
|
||||
import cy.agorise.crystalwallet.application.CrystalSecurityMonitor;
|
||||
import cy.agorise.crystalwallet.dialogs.material.CrystalLoading;
|
||||
import cy.agorise.crystalwallet.dialogs.material.DialogMaterial;
|
||||
import cy.agorise.crystalwallet.dialogs.material.NegativeResponse;
|
||||
import cy.agorise.crystalwallet.dialogs.material.PositiveResponse;
|
||||
import cy.agorise.crystalwallet.dialogs.material.QuestionDialog;
|
||||
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener;
|
||||
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests;
|
||||
import cy.agorise.crystalwallet.requestmanagers.ValidateImportBitsharesAccountRequest;
|
||||
|
@ -297,6 +304,19 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
|
||||
if (this.importSeedValidator.isValid()) {
|
||||
|
||||
/*
|
||||
* Question if continue
|
||||
* */
|
||||
final QuestionDialog questionDialog = new QuestionDialog(activity);
|
||||
questionDialog.setText(activity.getString(R.string.question_continue));
|
||||
questionDialog.setOnNegative(new NegativeResponse() {
|
||||
@Override
|
||||
public void onNegative(@NotNull DialogMaterial dialogMaterial) {
|
||||
}
|
||||
});
|
||||
questionDialog.setOnPositive(new PositiveResponse() {
|
||||
@Override
|
||||
public void onPositive() {
|
||||
|
||||
/*
|
||||
* Loading dialog
|
||||
|
@ -307,7 +327,7 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
/*
|
||||
* Validate mnemonic with the server
|
||||
* */
|
||||
final ValidateImportBitsharesAccountRequest request = new ValidateImportBitsharesAccountRequest(etAccountName.getText().toString().trim(),etSeedWords.getText().toString().trim(),this);
|
||||
final ValidateImportBitsharesAccountRequest request = new ValidateImportBitsharesAccountRequest(etAccountName.getText().toString().trim(),etSeedWords.getText().toString().trim(),activity);
|
||||
request.setListener(new CryptoNetInfoRequestListener() {
|
||||
@Override
|
||||
public void onCarryOut() {
|
||||
|
@ -332,7 +352,9 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
});
|
||||
CryptoNetInfoRequests.getInstance().addRequest(request);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
questionDialog.show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue