|
|
|
@ -55,7 +55,7 @@ import timber.log.Timber; |
|
|
|
|
public class WalletConnectSessionActivity extends BaseActivity |
|
|
|
|
{ |
|
|
|
|
private final Handler handler = new Handler(Looper.getMainLooper()); |
|
|
|
|
private final LocalBroadcastManager broadcastManager; |
|
|
|
|
private LocalBroadcastManager broadcastManager; |
|
|
|
|
WalletConnectViewModel viewModel; |
|
|
|
|
private RecyclerView recyclerView; |
|
|
|
|
private Button btnConnectWallet; |
|
|
|
@ -78,11 +78,6 @@ public class WalletConnectSessionActivity extends BaseActivity |
|
|
|
|
@Inject |
|
|
|
|
AWWalletConnectClient awWalletConnectClient; |
|
|
|
|
|
|
|
|
|
public WalletConnectSessionActivity() |
|
|
|
|
{ |
|
|
|
|
broadcastManager = LocalBroadcastManager.getInstance(getApplicationContext()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) |
|
|
|
|
{ |
|
|
|
@ -108,6 +103,11 @@ public class WalletConnectSessionActivity extends BaseActivity |
|
|
|
|
.get(WalletConnectViewModel.class); |
|
|
|
|
viewModel.serviceReady().observe(this, this::onServiceReady); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (broadcastManager == null) |
|
|
|
|
{ |
|
|
|
|
broadcastManager = LocalBroadcastManager.getInstance(getApplicationContext()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void onServiceReady(Boolean aBoolean) |
|
|
|
@ -123,13 +123,6 @@ public class WalletConnectSessionActivity extends BaseActivity |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onPause() |
|
|
|
|
{ |
|
|
|
|
super.onPause(); |
|
|
|
|
stopConnectionCheck(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setupList() |
|
|
|
|
{ |
|
|
|
|
wcSessions = viewModel.getSessions(); |
|
|
|
@ -173,6 +166,13 @@ public class WalletConnectSessionActivity extends BaseActivity |
|
|
|
|
viewModel.track(Analytics.Navigation.WALLET_CONNECT_SESSIONS); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onPause() |
|
|
|
|
{ |
|
|
|
|
super.onPause(); |
|
|
|
|
stopConnectionCheck(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean onCreateOptionsMenu(Menu menu) |
|
|
|
|
{ |
|
|
|
|