diff --git a/app/src/main/java/com/m2049r/xmrwallet/fragment/settings/SettingsFragment.java b/app/src/main/java/com/m2049r/xmrwallet/fragment/settings/SettingsFragment.java index c1f49fa..c18adfa 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/fragment/settings/SettingsFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/fragment/settings/SettingsFragment.java @@ -4,6 +4,7 @@ import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -11,6 +12,8 @@ import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProvider; import com.m2049r.xmrwallet.R; +import com.m2049r.xmrwallet.model.Wallet; +import com.m2049r.xmrwallet.model.WalletManager; public class SettingsFragment extends Fragment { @@ -26,5 +29,12 @@ public class SettingsFragment extends Fragment { public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); mViewModel = new ViewModelProvider(this).get(SettingsViewModel.class); + Wallet wallet = WalletManager.getInstance().getWallet(); + TextView walletInfoTextView = view.findViewById(R.id.wallet_info_textview); + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append("Seed: " + wallet.getSeed("")+"\n\n"); + stringBuilder.append("Private view-key: " + wallet.getSecretViewKey()+"\n\n"); + stringBuilder.append("Restore height: " + wallet.getRestoreHeight() + "\n\n"); + walletInfoTextView.setText(stringBuilder.toString()); } } \ No newline at end of file diff --git a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java index fb194ad..2d4e31f 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java +++ b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java @@ -54,8 +54,6 @@ public class MoneroHandlerThread extends Thread implements WalletListener { @Override public void run() { WalletManager.getInstance().setDaemon(Node.fromString(DefaultNodes.XMRTW.getUri())); - System.out.println(WalletManager.getInstance().getBlockchainHeight()); - System.out.println(wallet.getSeed("")); wallet.init(0); wallet.setListener(this); wallet.startRefresh(); diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index 59d4a98..fb89ace 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -16,4 +16,12 @@ app:layout_constraintTop_toTopOf="parent" app:layout_constraintStart_toStartOf="parent"/> + + \ No newline at end of file