mirror of
https://codeberg.org/anoncontributorxmr/mysu.git
synced 2024-11-25 08:52:28 +00:00
Really basic settings screen with debug info.
Seed is no longer logged.
This commit is contained in:
parent
8d4cf11779
commit
5c69fb7dba
3 changed files with 18 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -16,4 +16,12 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/wallet_info_textview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in a new issue