alpha-wallet-android icon indicating copy to clipboard operation
alpha-wallet-android copied to clipboard

Refactor WalletConnect OKHttp client usage

Open JamesSmartCell opened this issue 4 years ago • 1 comments

Refactor WalletConnectActivity, WCClient and WalletConnectService to remove the OKHttp client from WCClient and move ownership of all WC comms into WalletConnectService.

Currently, because the OKHttp client is created in WalletConnectActivity, and kept within each WCClient object, and each OKHttp client connect contains a link to the WalletConnectActivity context, the context is leaked when WalletConnectActivity is destroyed.

The OKHttp client should be constructed in WaletConnectService, using the service context.

JamesSmartCell avatar Nov 04 '21 02:11 JamesSmartCell

@JamesSmartCell , I'm a bit confused here. OkHttpClient doesn't need context to start so how can it leak activity. Can you please guide me if I understood it wrong?

asif-finimble avatar Feb 22 '22 12:02 asif-finimble