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