diff --git a/app/src/main/java/net/mynero/wallet/fragment/dialog/WalletKeysBottomSheetDialog.java b/app/src/main/java/net/mynero/wallet/fragment/dialog/WalletKeysBottomSheetDialog.java
index c27ea2d..50c3364 100644
--- a/app/src/main/java/net/mynero/wallet/fragment/dialog/WalletKeysBottomSheetDialog.java
+++ b/app/src/main/java/net/mynero/wallet/fragment/dialog/WalletKeysBottomSheetDialog.java
@@ -13,11 +13,11 @@ import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import net.mynero.wallet.R;
+import net.mynero.wallet.model.Wallet;
+import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.util.Helper;
public class WalletKeysBottomSheetDialog extends BottomSheetDialogFragment {
- public boolean showCopyButton = false;
- public String information = "";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@@ -27,14 +27,19 @@ public class WalletKeysBottomSheetDialog extends BottomSheetDialogFragment {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
- ImageButton copyInformationImageButton = view.findViewById(R.id.copy_information_imagebutton);
- if (showCopyButton) {
- copyInformationImageButton.setVisibility(View.VISIBLE);
- } else {
- copyInformationImageButton.setVisibility(View.INVISIBLE);
- }
- TextView informationTextView = view.findViewById(R.id.information_textview);
- informationTextView.setText(information);
- copyInformationImageButton.setOnClickListener(view1 -> Helper.clipBoardCopy(getContext(), "information", information));
+ ImageButton copyViewKeyImageButton = view.findViewById(R.id.copy_viewkey_imagebutton);
+ TextView informationTextView = view.findViewById(R.id.information_textview); // seed
+ TextView viewKeyTextView = view.findViewById(R.id.viewkey_textview);
+ TextView restoreHeightTextView = view.findViewById(R.id.restore_height_textview);
+
+ Wallet wallet = WalletManager.getInstance().getWallet();
+ String seed = wallet.getSeed("");
+ String privateViewKey = wallet.getSecretViewKey();
+
+ informationTextView.setText(seed);
+ viewKeyTextView.setText(privateViewKey);
+ restoreHeightTextView.setText(wallet.getRestoreHeight()+"");
+
+ copyViewKeyImageButton.setOnClickListener(view1 -> Helper.clipBoardCopy(getContext(), "private view-key", privateViewKey));
}
}
\ No newline at end of file
diff --git a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java
index e132754..2a450aa 100644
--- a/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java
+++ b/app/src/main/java/net/mynero/wallet/fragment/settings/SettingsFragment.java
@@ -185,8 +185,6 @@ public class SettingsFragment extends Fragment implements PasswordBottomSheetDia
private void displaySeedDialog() {
WalletKeysBottomSheetDialog informationDialog = new WalletKeysBottomSheetDialog();
- informationDialog.showCopyButton = false;
- informationDialog.information = WalletManager.getInstance().getWallet().getSeed("");
informationDialog.show(getActivity().getSupportFragmentManager(), "information_seed_dialog");
}
diff --git a/app/src/main/res/layout/wallet_keys_bottom_sheet_dialog.xml b/app/src/main/res/layout/wallet_keys_bottom_sheet_dialog.xml
index 6ccf79c..49601ec 100644
--- a/app/src/main/res/layout/wallet_keys_bottom_sheet_dialog.xml
+++ b/app/src/main/res/layout/wallet_keys_bottom_sheet_dialog.xml
@@ -21,26 +21,84 @@
android:text="@string/wallet_keys_label"
android:textSize="32sp"
android:textStyle="bold"
- app:layout_constraintBottom_toTopOf="@id/information_textview"
+ app:layout_constraintBottom_toTopOf="@id/recv_monero_textview"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
+
+
+
+
+
+
+
+
+
+
+ app:layout_constraintStart_toEndOf="@id/viewkey_textview"
+ app:layout_constraintTop_toBottomOf="@id/wallet_viewkey_desc_textview" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 99ce912..eb4ae6b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -104,4 +104,9 @@
Cannot edit current node.
Cannot edit default node.
Edit Node
+ Recovery phrase
+ Anyone with your recovery phrase can spend ALL coins in this wallet!
+ Private view-key
+ Anyone with your private view-key can see all incoming transactions!
+ Restore height