From 832379aa943a0dc3d782bf228fe43d7302fed477 Mon Sep 17 00:00:00 2001 From: pokkst Date: Wed, 7 Sep 2022 15:16:02 -0500 Subject: [PATCH] Fixes initialization issue with HistoryService NOTE: As of this commit, the app logs the wallet seed for development purposes. --- app/src/main/java/com/m2049r/xmrwallet/MainActivity.java | 2 +- .../com/m2049r/xmrwallet/service/MoneroHandlerThread.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/MainActivity.java b/app/src/main/java/com/m2049r/xmrwallet/MainActivity.java index e7fd3b0..32e45db 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/MainActivity.java +++ b/app/src/main/java/com/m2049r/xmrwallet/MainActivity.java @@ -42,11 +42,11 @@ public class MainActivity extends AppCompatActivity implements MoneroHandlerThre } WalletManager.getInstance().setProxy("127.0.0.1:9050"); thread = new MoneroHandlerThread("WalletService", wallet, this); - thread.start(); this.txService = new TxService(this, thread); this.balanceService = new BalanceService(this, thread); this.addressService = new AddressService(this, thread); this.historyService = new HistoryService(this, thread); + thread.start(); } @Override 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 942f9ef..a7e8469 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java +++ b/app/src/main/java/com/m2049r/xmrwallet/service/MoneroHandlerThread.java @@ -41,6 +41,11 @@ public class MoneroHandlerThread extends Thread implements WalletListener { super(null, null, name, THREAD_STACK_SIZE); this.wallet = wallet; this.listener = listener; + } + + @Override + public synchronized void start() { + super.start(); this.listener.onRefresh(); }