Fixes initialization issue with HistoryService

NOTE: As of this commit, the app logs the wallet seed for development purposes.
This commit is contained in:
pokkst 2022-09-07 15:16:02 -05:00
parent b0f4462838
commit 832379aa94
No known key found for this signature in database
GPG key ID: 90C2ED85E67A50FF
2 changed files with 6 additions and 1 deletions

View file

@ -42,11 +42,11 @@ public class MainActivity extends AppCompatActivity implements MoneroHandlerThre
} }
WalletManager.getInstance().setProxy("127.0.0.1:9050"); WalletManager.getInstance().setProxy("127.0.0.1:9050");
thread = new MoneroHandlerThread("WalletService", wallet, this); thread = new MoneroHandlerThread("WalletService", wallet, this);
thread.start();
this.txService = new TxService(this, thread); this.txService = new TxService(this, thread);
this.balanceService = new BalanceService(this, thread); this.balanceService = new BalanceService(this, thread);
this.addressService = new AddressService(this, thread); this.addressService = new AddressService(this, thread);
this.historyService = new HistoryService(this, thread); this.historyService = new HistoryService(this, thread);
thread.start();
} }
@Override @Override

View file

@ -41,6 +41,11 @@ public class MoneroHandlerThread extends Thread implements WalletListener {
super(null, null, name, THREAD_STACK_SIZE); super(null, null, name, THREAD_STACK_SIZE);
this.wallet = wallet; this.wallet = wallet;
this.listener = listener; this.listener = listener;
}
@Override
public synchronized void start() {
super.start();
this.listener.onRefresh(); this.listener.onRefresh();
} }