mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-23 14:05:30 -04:00
update state from wallet notifications on UserThread
This commit is contained in:
parent
a6f6f5c00a
commit
c28ffb70ff
7 changed files with 93 additions and 100 deletions
|
@ -1297,12 +1297,16 @@ public class XmrWalletService {
|
|||
}
|
||||
|
||||
public void addWalletListener(MoneroWalletListenerI listener) {
|
||||
walletListeners.add(listener);
|
||||
synchronized (walletListeners) {
|
||||
walletListeners.add(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeWalletListener(MoneroWalletListenerI listener) {
|
||||
if (!walletListeners.contains(listener)) throw new RuntimeException("Listener is not registered with wallet");
|
||||
walletListeners.remove(listener);
|
||||
synchronized (walletListeners) {
|
||||
if (!walletListeners.contains(listener)) throw new RuntimeException("Listener is not registered with wallet");
|
||||
walletListeners.remove(listener);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO (woodser): update balance and other listening
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue