diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2e50b93f0..40f85e66e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -223,8 +223,7 @@
+ android:windowSoftInputMode="stateHidden|adjustResize" />
diff --git a/app/src/main/java/io/stormbird/wallet/service/KeyService.java b/app/src/main/java/io/stormbird/wallet/service/KeyService.java
index 9e0fb7ad6..5f5ca8a43 100644
--- a/app/src/main/java/io/stormbird/wallet/service/KeyService.java
+++ b/app/src/main/java/io/stormbird/wallet/service/KeyService.java
@@ -737,6 +737,9 @@ public class KeyService implements AuthenticationCallback, PinAuthenticationCall
signDialog.setCancelListener(v -> {
authenticateFail("Cancelled", AuthenticationFailType.AUTHENTICATION_DIALOG_CANCELLED, operation.ordinal());
});
+ signDialog.setOnDismissListener(v -> {
+ signDialog = null;
+ });
signDialog.show();
signDialog.getFingerprintAuthorisation(this);
}
@@ -1132,6 +1135,12 @@ public class KeyService implements AuthenticationCallback, PinAuthenticationCall
return securityStatus == SecurityStatus.HAS_STRONGBOX;
}
+ public void resetSigningDialog()
+ {
+ if (signDialog != null) signDialog.dismiss();
+ signDialog = null;
+ }
+
private boolean deviceIsLocked()
{
KeyguardManager keyguardManager = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
diff --git a/app/src/main/java/io/stormbird/wallet/ui/BackupKeyActivity.java b/app/src/main/java/io/stormbird/wallet/ui/BackupKeyActivity.java
index edf9b9ede..41767edb0 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/BackupKeyActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/BackupKeyActivity.java
@@ -4,6 +4,7 @@ import android.arch.lifecycle.ViewModelProviders;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
+import android.os.Handler;
import android.support.annotation.Nullable;
import android.text.Editable;
import android.text.TextWatcher;
@@ -41,7 +42,7 @@ import static io.stormbird.wallet.C.Key.WALLET;
import static io.stormbird.wallet.C.SHARE_REQUEST_CODE;
public class BackupKeyActivity extends BaseActivity implements View.OnClickListener,
- CreateWalletCallbackInterface, TextWatcher, SignAuthenticationCallback
+ CreateWalletCallbackInterface, TextWatcher, SignAuthenticationCallback, Runnable
{
@Inject
BackupKeyViewModelFactory backupKeyViewModelFactory;
@@ -60,6 +61,8 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
private String[] mnemonicArray;
private PinAuthenticationCallbackInterface authInterface;
private ImageView spacerImage;
+ private LinearLayout successOverlay;
+ private Handler handler;
private AWalletAlertDialog alertDialog;
@@ -119,7 +122,12 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
setContentView(R.layout.activity_backup);
initViews();
- setTitle(getString(R.string.action_upgrade_key));
+ successOverlay = findViewById(R.id.layout_success_overlay);
+ if (successOverlay != null) successOverlay.setVisibility(View.VISIBLE);
+ handler = new Handler();
+ handler.postDelayed(this, 1000);
+
+ setTitle(getString(R.string.empty));
state = BackupState.UPGRADE_KEY_SECURITY;
if (wallet.type == WalletType.KEYSTORE) title.setText(R.string.lock_keystore_upgrade);
else title.setText(R.string.lock_key_upgrade);
@@ -189,7 +197,7 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
setContentView(R.layout.activity_backup);
initViews();
- setTitle(getString(R.string.title_backup_seed));
+ setTitle(getString(R.string.empty));
title.setText(R.string.backup_seed_phrase);
backupImage.setImageResource(R.drawable.seed_graphic);
detail.setText(R.string.backup_seed_phrase_detail);
@@ -198,7 +206,7 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
private void setupJSONExport()
{
- setContentView(R.layout.activity_backup);
+ setContentView(R.layout.activity_json_backup);
initViews();
setTitle(getString(R.string.export_keystore_json));
@@ -214,15 +222,33 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
setContentView(R.layout.activity_show_seed_phrase);
initViews();
- setTitle(getString(R.string.seed_phrase));
+ setTitle(getString(R.string.empty));
title.setText(getString(R.string.make_a_backup, "12"));
nextButton.setText(R.string.test_seed_phrase);
}
+ @Override
+ public void run()
+ {
+ if (successOverlay == null) return;
+ if (successOverlay.getAlpha() > 0)
+ {
+ successOverlay.animate().alpha(0.0f).setDuration(500);
+ handler.postDelayed(this, 750);
+ }
+ else
+ {
+ successOverlay.setVisibility(View.GONE);
+ successOverlay.setAlpha(1.0f);
+ handler = null;
+ }
+ }
+
@Override
public void onPause()
{
super.onPause();
+ viewModel.resetSignDialog();
//hide seed phrase and any visible words
if (layoutWordHolder != null) layoutWordHolder.removeAllViews();
@@ -499,7 +525,7 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
spacerImage.setVisibility(View.GONE);
}
- setTitle(getString(R.string.title_backup_seed));
+ setTitle(getString(R.string.empty));
state = BackupState.VERIFY_SEED_PHRASE;
title.setText(R.string.verify_seed_phrase);
nextButton.setText(R.string.action_continue);
@@ -557,7 +583,7 @@ public class BackupKeyActivity extends BaseActivity implements View.OnClickListe
setContentView(R.layout.activity_backup_write_seed);
initViews();
- setTitle(getString(R.string.title_backup_seed));
+ setTitle(getString(R.string.empty));
state = BackupState.WRITE_DOWN_SEED_PHRASE;
title.setText(R.string.write_down_seed_phrase);
nextButton.setText(R.string.wrote_down_seed_phrase);
diff --git a/app/src/main/java/io/stormbird/wallet/ui/ConfirmationActivity.java b/app/src/main/java/io/stormbird/wallet/ui/ConfirmationActivity.java
index e35471fe5..3e9873b90 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/ConfirmationActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/ConfirmationActivity.java
@@ -277,6 +277,13 @@ public class ConfirmationActivity extends BaseActivity implements SignAuthentica
viewModel.prepare(this);
}
+ @Override
+ public void onPause()
+ {
+ super.onPause();
+ viewModel.resetSignDialog();
+ }
+
private void onProgress(boolean shouldShowProgress) {
hideDialog();
if (shouldShowProgress) {
diff --git a/app/src/main/java/io/stormbird/wallet/ui/FunctionActivity.java b/app/src/main/java/io/stormbird/wallet/ui/FunctionActivity.java
index e40c51dec..caa01c768 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/FunctionActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/FunctionActivity.java
@@ -545,6 +545,13 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
}
+ @Override
+ public void onPause()
+ {
+ super.onPause();
+ viewModel.resetSignDialog();
+ }
+
@Override
public void onSignPersonalMessage(Message message)
{
diff --git a/app/src/main/java/io/stormbird/wallet/ui/HomeActivity.java b/app/src/main/java/io/stormbird/wallet/ui/HomeActivity.java
index 5b5d70168..0fd948e5b 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/HomeActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/HomeActivity.java
@@ -6,6 +6,7 @@ import android.app.Dialog;
import android.arch.lifecycle.*;
import android.content.*;
import android.content.pm.PackageManager;
+import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
@@ -196,7 +197,7 @@ public class HomeActivity extends BaseNavigationActivity implements View.OnClick
}
viewModel.cleanDatabases(this);
- showFindWalletAddressDialog();
+ showBackupWalletDialog();
}
private void onBackup(String address)
@@ -207,43 +208,44 @@ public class HomeActivity extends BaseNavigationActivity implements View.OnClick
}
}
- // public void showBackupWalletDialog() {
-// if (!viewModel.isBackupWalletDialogShown()) {
-// backupWalletDialog = TutoShowcase.from(this);
-// backupWalletDialog.setContentView(R.layout.showcase_backup_wallet)
-// .onClickContentView(R.id.btn_close, view -> {
-// backupWalletDialog.dismiss();
-// })
-// .on(R.id.layout_nav_settings)
-// .addCircle()
-// .onClick(v -> {
-// backupWalletDialog.dismiss();
-// showPage(SETTINGS);
-// })
-// .show();
-// viewModel.setBackupWalletDialogShown(true);
-// }
-// }
-
- public void showFindWalletAddressDialog() {
+ public void showBackupWalletDialog() {
if (!viewModel.isFindWalletAddressDialogShown()) {
- findWalletAddressDialog = TutoShowcase.from(this);
- findWalletAddressDialog.setContentView(R.layout.showcase_find_wallet)
+ int lighterBackground = Color.argb(102, 0, 0, 0); //40% opacity
+ backupWalletDialog = TutoShowcase.from(this);
+ backupWalletDialog.setContentView(R.layout.showcase_backup_wallet)
+ .setBackgroundColor(lighterBackground)
.onClickContentView(R.id.btn_close, view -> {
- findWalletAddressDialog.dismiss();
- findWalletAddressDialog = null;
+ backupWalletDialog.dismiss();
})
.on(R.id.layout_nav_settings)
.addCircle()
.onClick(v -> {
- findWalletAddressDialog.dismiss();
- findWalletAddressDialog = null;
+ backupWalletDialog.dismiss();
+ showPage(SETTINGS);
})
.show();
viewModel.setFindWalletAddressDialogShown(true);
}
}
+// public void showFindWalletAddressDialog() {
+// if (!viewModel.isFindWalletAddressDialogShown()) {
+// findWalletAddressDialog = TutoShowcase.from(this);
+// findWalletAddressDialog.setContentView(R.layout.showcase_find_wallet)
+// .onClickContentView(R.id.btn_close, view -> {
+// findWalletAddressDialog.dismiss();
+// findWalletAddressDialog = null;
+// })
+// .on(R.id.layout_nav_settings)
+// .addCircle()
+// .onClick(v -> {
+// findWalletAddressDialog.dismiss();
+// findWalletAddressDialog = null;
+// })
+// .show();
+// viewModel.setFindWalletAddressDialogShown(true);
+// }
+// }
private void onWalletName(String name) {
if (name != null && !name.isEmpty()) {
diff --git a/app/src/main/java/io/stormbird/wallet/ui/ImportTokenActivity.java b/app/src/main/java/io/stormbird/wallet/ui/ImportTokenActivity.java
index d5b9009fa..6187118e5 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/ImportTokenActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/ImportTokenActivity.java
@@ -216,6 +216,7 @@ public class ImportTokenActivity extends BaseActivity implements View.OnClickLis
{
super.onPause();
hideDialog();
+ viewModel.resetSignDialog();
}
@Override
diff --git a/app/src/main/java/io/stormbird/wallet/ui/ImportWalletActivity.java b/app/src/main/java/io/stormbird/wallet/ui/ImportWalletActivity.java
index 3baf813c0..af16753d4 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/ImportWalletActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/ImportWalletActivity.java
@@ -176,8 +176,8 @@ public class ImportWalletActivity extends BaseActivity implements OnImportSeedLi
@Override
protected void onPause() {
super.onPause();
-
hideDialog();
+ importWalletViewModel.resetSignDialog();
}
private void onWallet(Wallet wallet) {
diff --git a/app/src/main/java/io/stormbird/wallet/ui/RedeemSignatureDisplayActivity.java b/app/src/main/java/io/stormbird/wallet/ui/RedeemSignatureDisplayActivity.java
index b479e916d..40f216fd0 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/RedeemSignatureDisplayActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/RedeemSignatureDisplayActivity.java
@@ -120,6 +120,13 @@ public class RedeemSignatureDisplayActivity extends BaseActivity implements View
viewModel.prepare(token.tokenInfo.address, token, ticketRange.range);
}
+ @Override
+ public void onPause()
+ {
+ super.onPause();
+ viewModel.resetSignDialog();
+ }
+
@Override
protected void onDestroy()
{
diff --git a/app/src/main/java/io/stormbird/wallet/ui/SellDetailActivity.java b/app/src/main/java/io/stormbird/wallet/ui/SellDetailActivity.java
index 1a4a067f8..dcfd40179 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/SellDetailActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/SellDetailActivity.java
@@ -549,6 +549,13 @@ public class SellDetailActivity extends BaseActivity implements OnTokenClickList
handler = new Handler();
}
+ @Override
+ public void onPause()
+ {
+ super.onPause();
+ viewModel.resetSignDialog();
+ }
+
@Override
public void onTokenClick(View view, Token token, List ids, boolean selected) {
Context context = view.getContext();
diff --git a/app/src/main/java/io/stormbird/wallet/ui/TransferTicketDetailActivity.java b/app/src/main/java/io/stormbird/wallet/ui/TransferTicketDetailActivity.java
index e87b9d9f2..382f6058f 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/TransferTicketDetailActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/TransferTicketDetailActivity.java
@@ -448,6 +448,13 @@ public class TransferTicketDetailActivity extends BaseActivity implements Runnab
}
}
+ @Override
+ public void onPause()
+ {
+ super.onPause();
+ viewModel.resetSignDialog();
+ }
+
private void onProgress(boolean shouldShowProgress)
{
hideDialog();
diff --git a/app/src/main/java/io/stormbird/wallet/ui/WalletActionsActivity.java b/app/src/main/java/io/stormbird/wallet/ui/WalletActionsActivity.java
index 6ecbd0230..ed65848ee 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/WalletActionsActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/WalletActionsActivity.java
@@ -64,7 +64,6 @@ public class WalletActionsActivity extends BaseActivity implements View.OnClickL
walletCount++;
isNewWallet = getIntent().getBooleanExtra("isNewWallet", false);
initViews();
- //HDKeyService.flagAsNotBackedUp(this, wallet.address);
} else {
finish();
}
diff --git a/app/src/main/java/io/stormbird/wallet/ui/WalletsActivity.java b/app/src/main/java/io/stormbird/wallet/ui/WalletsActivity.java
index 1317575a1..b1418dfea 100644
--- a/app/src/main/java/io/stormbird/wallet/ui/WalletsActivity.java
+++ b/app/src/main/java/io/stormbird/wallet/ui/WalletsActivity.java
@@ -42,6 +42,8 @@ import io.stormbird.wallet.widget.AddWalletView;
import io.stormbird.wallet.widget.SignTransactionDialog;
import io.stormbird.wallet.widget.SystemView;
+import static io.stormbird.wallet.C.Key.WALLET;
+
public class WalletsActivity extends BaseActivity implements
View.OnClickListener,
AddWalletView.OnNewWalletClickListener,
@@ -90,9 +92,17 @@ public class WalletsActivity extends BaseActivity implements
viewModel.createWalletError().observe(this, this::onCreateWalletError);
viewModel.updateBalance().observe(this, this::onUpdatedBalance);
viewModel.updateENSName().observe(this, this::updateWalletName);
+ viewModel.noWalletsError().observe(this, this::noWallets);
viewModel.findNetwork();
}
+ private void noWallets(Boolean aBoolean)
+ {
+ Intent intent = new Intent(this, SplashActivity.class);
+ startActivity(intent);
+ finish();
+ }
+
private void updateWalletName(Wallet wallet)
{
adapter.updateWalletName(wallet);
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/BackupKeyViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/BackupKeyViewModel.java
index ba72bdb9c..04a0dc185 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/BackupKeyViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/BackupKeyViewModel.java
@@ -156,5 +156,10 @@ public class BackupKeyViewModel extends BaseViewModel {
{
fetchWalletsInteract.updateBackupTime(wallet.address).isDisposed();
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/ConfirmationViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/ConfirmationViewModel.java
index 8e21873a7..f3dfa0c9a 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/ConfirmationViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/ConfirmationViewModel.java
@@ -245,4 +245,9 @@ public class ConfirmationViewModel extends BaseViewModel {
keyService.getAuthenticationForSignature(defaultWallet.getValue(), activity, callback);
}
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/DappBrowserViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/DappBrowserViewModel.java
index b8e15a709..491860f8e 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/DappBrowserViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/DappBrowserViewModel.java
@@ -310,4 +310,9 @@ public class DappBrowserViewModel extends BaseViewModel {
{
keyService.getAuthenticationForSignature(wallet, activity, callback);
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/ImportTokenViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/ImportTokenViewModel.java
index 85347a715..bbf95e12b 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/ImportTokenViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/ImportTokenViewModel.java
@@ -677,4 +677,9 @@ public class ImportTokenViewModel extends BaseViewModel
keyService.getAuthenticationForSignature(wallet.getValue(), activity, callback);
}
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/ImportWalletViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/ImportWalletViewModel.java
index 4ea67e600..2c93b0d6a 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/ImportWalletViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/ImportWalletViewModel.java
@@ -153,4 +153,9 @@ public class ImportWalletViewModel extends BaseViewModel implements OnSetWatchWa
return isValid;
});
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/RedeemSignatureDisplayModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/RedeemSignatureDisplayModel.java
index 119672022..1f266e475 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/RedeemSignatureDisplayModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/RedeemSignatureDisplayModel.java
@@ -293,4 +293,9 @@ public class RedeemSignatureDisplayModel extends BaseViewModel
keyService.getAuthenticationForSignature(defaultWallet.getValue(), activity, callback);
}
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/SellDetailViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/SellDetailViewModel.java
index 52a0da8ef..bf1f5f32b 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/SellDetailViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/SellDetailViewModel.java
@@ -145,4 +145,9 @@ public class SellDetailViewModel extends BaseViewModel {
keyService.getAuthenticationForSignature(defaultWallet.getValue(), activity, callback);
}
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/TokenFunctionViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/TokenFunctionViewModel.java
index 95c1023da..509412688 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/TokenFunctionViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/TokenFunctionViewModel.java
@@ -208,4 +208,9 @@ public class TokenFunctionViewModel extends BaseViewModel
.find()
.subscribe(wallet -> { this.wallet = wallet; }, this::onError);
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/TransferTicketDetailViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/TransferTicketDetailViewModel.java
index b120357c5..9dfff0d47 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/TransferTicketDetailViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/TransferTicketDetailViewModel.java
@@ -277,4 +277,9 @@ public class TransferTicketDetailViewModel extends BaseViewModel {
keyService.getAuthenticationForSignature(defaultWallet.getValue(), activity, callback);
}
}
+
+ public void resetSignDialog()
+ {
+ keyService.resetSigningDialog();
+ }
}
diff --git a/app/src/main/java/io/stormbird/wallet/viewmodel/WalletsViewModel.java b/app/src/main/java/io/stormbird/wallet/viewmodel/WalletsViewModel.java
index 9e8259335..6db025305 100644
--- a/app/src/main/java/io/stormbird/wallet/viewmodel/WalletsViewModel.java
+++ b/app/src/main/java/io/stormbird/wallet/viewmodel/WalletsViewModel.java
@@ -63,6 +63,7 @@ public class WalletsViewModel extends BaseViewModel
private final MutableLiveData defaultWallet = new MutableLiveData<>();
private final MutableLiveData createdWallet = new MutableLiveData<>();
private final MutableLiveData createWalletError = new MutableLiveData<>();
+ private final MutableLiveData noWalletsError = new MutableLiveData<>();
private final MutableLiveData updateBalance = new MutableLiveData<>();
private final MutableLiveData defaultNetwork = new MutableLiveData<>();
private final MutableLiveData updateENSName = new MutableLiveData<>();
@@ -119,6 +120,7 @@ public class WalletsViewModel extends BaseViewModel
{
return createWalletError;
}
+ public LiveData noWalletsError() { return noWalletsError; }
public LiveData updateBalance()
{
@@ -155,8 +157,8 @@ public class WalletsViewModel extends BaseViewModel
disposable = genericWalletInteract
.find()
- .subscribe(this::onDefaultWalletChanged, t -> {
- });
+ .subscribe(this::onDefaultWalletChanged,
+ error -> noWalletsError.postValue(true));
}
private void onWallets(Wallet[] items)
diff --git a/app/src/main/res/drawable-hdpi/ic_logo.png b/app/src/main/res/drawable-hdpi/ic_logo.png
deleted file mode 100755
index b3d312619..000000000
Binary files a/app/src/main/res/drawable-hdpi/ic_logo.png and /dev/null differ
diff --git a/app/src/main/res/drawable-hdpi/ic_splash_welcome.png b/app/src/main/res/drawable-hdpi/ic_splash_welcome.png
deleted file mode 100644
index 543ca9618..000000000
Binary files a/app/src/main/res/drawable-hdpi/ic_splash_welcome.png and /dev/null differ
diff --git a/app/src/main/res/drawable-mdpi/ic_logo.png b/app/src/main/res/drawable-mdpi/ic_logo.png
deleted file mode 100755
index 4eccfbd55..000000000
Binary files a/app/src/main/res/drawable-mdpi/ic_logo.png and /dev/null differ
diff --git a/app/src/main/res/drawable-mdpi/ic_splash_welcome.png b/app/src/main/res/drawable-mdpi/ic_splash_welcome.png
deleted file mode 100644
index 9bad7deb8..000000000
Binary files a/app/src/main/res/drawable-mdpi/ic_splash_welcome.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_logo.png b/app/src/main/res/drawable-xhdpi/ic_logo.png
deleted file mode 100755
index c9b6d080c..000000000
Binary files a/app/src/main/res/drawable-xhdpi/ic_logo.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_splash_welcome.png b/app/src/main/res/drawable-xhdpi/ic_splash_welcome.png
deleted file mode 100644
index 6f4f90f1f..000000000
Binary files a/app/src/main/res/drawable-xhdpi/ic_splash_welcome.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_logo.png b/app/src/main/res/drawable-xxhdpi/ic_logo.png
deleted file mode 100755
index e4d8e0ca5..000000000
Binary files a/app/src/main/res/drawable-xxhdpi/ic_logo.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_splash_welcome.png b/app/src/main/res/drawable-xxhdpi/ic_splash_welcome.png
deleted file mode 100644
index 1fd505fc5..000000000
Binary files a/app/src/main/res/drawable-xxhdpi/ic_splash_welcome.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_logo.png b/app/src/main/res/drawable-xxxhdpi/ic_logo.png
deleted file mode 100755
index fed6b3774..000000000
Binary files a/app/src/main/res/drawable-xxxhdpi/ic_logo.png and /dev/null differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_splash_welcome.png b/app/src/main/res/drawable-xxxhdpi/ic_splash_welcome.png
deleted file mode 100644
index 1f7fe546e..000000000
Binary files a/app/src/main/res/drawable-xxxhdpi/ic_splash_welcome.png and /dev/null differ
diff --git a/app/src/main/res/drawable/ic_logo.xml b/app/src/main/res/drawable/ic_logo.xml
new file mode 100644
index 000000000..46271c163
--- /dev/null
+++ b/app/src/main/res/drawable/ic_logo.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/item_white_triangle.xml b/app/src/main/res/drawable/item_white_triangle.xml
new file mode 100644
index 000000000..086748597
--- /dev/null
+++ b/app/src/main/res/drawable/item_white_triangle.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/splash_background.xml b/app/src/main/res/drawable/splash_background.xml
index 94fce81a8..a24221f99 100644
--- a/app/src/main/res/drawable/splash_background.xml
+++ b/app/src/main/res/drawable/splash_background.xml
@@ -2,9 +2,7 @@
- -
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_backup.xml b/app/src/main/res/layout/activity_backup.xml
index 693bade6a..8e791645d 100644
--- a/app/src/main/res/layout/activity_backup.xml
+++ b/app/src/main/res/layout/activity_backup.xml
@@ -1,11 +1,16 @@
-
-
+
+
+
@@ -91,4 +97,24 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_backup_write_seed.xml b/app/src/main/res/layout/activity_backup_write_seed.xml
index 3c7ee5bbb..d25c9cde0 100644
--- a/app/src/main/res/layout/activity_backup_write_seed.xml
+++ b/app/src/main/res/layout/activity_backup_write_seed.xml
@@ -7,7 +7,7 @@
android:background="@color/colorPrimaryDark"
android:orientation="vertical">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_set_json_password.xml b/app/src/main/res/layout/activity_set_json_password.xml
index 8f63fc84e..62e2b3a6b 100644
--- a/app/src/main/res/layout/activity_set_json_password.xml
+++ b/app/src/main/res/layout/activity_set_json_password.xml
@@ -50,6 +50,7 @@
android:layout_marginTop="20dp"
android:layout_marginEnd="42dp"
android:text="@string/keystore_loss_warning"
+ android:lineSpacingExtra="2sp"
android:gravity="center_horizontal"
android:textColor="@color/text_dark_gray"
android:textSize="14sp"/>
diff --git a/app/src/main/res/layout/activity_show_seed_phrase.xml b/app/src/main/res/layout/activity_show_seed_phrase.xml
index d5c5ec398..632635a2e 100644
--- a/app/src/main/res/layout/activity_show_seed_phrase.xml
+++ b/app/src/main/res/layout/activity_show_seed_phrase.xml
@@ -5,7 +5,7 @@
android:background="@color/colorPrimaryDark"
android:orientation="vertical">
-
+
diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml
index c9769ff4f..e1c3976e4 100644
--- a/app/src/main/res/layout/activity_splash.xml
+++ b/app/src/main/res/layout/activity_splash.xml
@@ -1,16 +1,35 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/showcase_backup_wallet.xml b/app/src/main/res/layout/showcase_backup_wallet.xml
index 96dfefefc..b090d0aee 100644
--- a/app/src/main/res/layout/showcase_backup_wallet.xml
+++ b/app/src/main/res/layout/showcase_backup_wallet.xml
@@ -4,6 +4,7 @@
android:layout_height="match_parent">
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/showcase_find_wallet.xml b/app/src/main/res/layout/showcase_find_wallet.xml
index dcd9ac27d..86c1a6194 100644
--- a/app/src/main/res/layout/showcase_find_wallet.xml
+++ b/app/src/main/res/layout/showcase_find_wallet.xml
@@ -4,6 +4,7 @@
android:layout_height="match_parent">
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index e9a7d124b..f5cefd3bb 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -178,4 +178,6 @@
Re-Import Wallet?
Provide authentication to create key
Import Error, Try re-import again.
+ Welcome to AlphaWallet
+ AlphaWallet Logo
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index 5733e6720..fa4850e76 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -444,4 +444,6 @@
Re-Import Wallet?
Provide authentication to create key
Import Error, Try re-import again.
+ Welcome to AlphaWallet
+ AlphaWallet Logo
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ea0072a8c..84532c055 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -580,4 +580,6 @@
Re-Import Wallet?
Provide authentication to create key
Import Error, Try re-import again.
+ Welcome to AlphaWallet
+ AlphaWallet Logo
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 1cddddca2..8040dcd83 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -34,4 +34,13 @@
- 20sp
+
+
+
+
diff --git a/dmz/src/main/java/io/stormbird/token/web/Service/CryptoFunctions.java b/dmz/src/main/java/io/stormbird/token/web/Service/CryptoFunctions.java
index af4543f89..32d60ee98 100644
--- a/dmz/src/main/java/io/stormbird/token/web/Service/CryptoFunctions.java
+++ b/dmz/src/main/java/io/stormbird/token/web/Service/CryptoFunctions.java
@@ -28,7 +28,8 @@ public class CryptoFunctions implements CryptoFunctionsInterface
public BigInteger signedMessageToKey(byte[] data, byte[] signature) throws SignatureException
{
Sign.SignatureData sigData = sigFromByteArray(signature);
- return Sign.signedMessageToKey(data, sigData);
+ if (sigData == null) return BigInteger.ZERO;
+ else return Sign.signedMessageToKey(data, sigData);
}
@Override
@@ -39,6 +40,8 @@ public class CryptoFunctions implements CryptoFunctionsInterface
public static Sign.SignatureData sigFromByteArray(byte[] sig)
{
+ if (sig.length < 64 || sig.length > 65) return null;
+
byte subv = sig[64];
if (subv < 27) subv += 27;