@@ -31,7 +31,6 @@ import kotlinx.coroutines.flow.Flow
3131import kotlinx.coroutines.flow.MutableSharedFlow
3232import kotlinx.coroutines.flow.MutableStateFlow
3333import kotlinx.coroutines.flow.combine
34- import kotlinx.coroutines.flow.first
3534import kotlinx.coroutines.launch
3635import kotlinx.coroutines.runBlocking
3736import org.koin.core.component.KoinComponent
@@ -110,7 +109,6 @@ private constructor(
110109 private lateinit var sessionRequestAccount: Account
111110 private lateinit var sessionRequestAppMetadata: AppMetadata
112111 private val handledRequests = mutableSetOf<Long >()
113- private val connectionAvailabilityFlow = MutableStateFlow (false )
114112
115113 enum class ProofProvableState {
116114 Provable ,
@@ -357,11 +355,6 @@ private constructor(
357355 }
358356 }
359357
360- override fun onConnectionStateChange (state : Sign .Model .ConnectionState ) {
361- defaultWalletDelegate.onConnectionStateChange(state)
362- connectionAvailabilityFlow.tryEmit(state.isAvailable)
363- }
364-
365358 override fun onSessionProposal (
366359 sessionProposal : Sign .Model .SessionProposal ,
367360 verifyContext : Sign .Model .VerifyContext ,
@@ -1029,7 +1022,7 @@ private constructor(
10291022
10301023 State .WaitingForSessionProposal ,
10311024 State .WaitingForSessionRequest ,
1032- -> {
1025+ -> {
10331026 mutableStateFlow.tryEmit(State .Idle )
10341027 }
10351028
@@ -1098,17 +1091,14 @@ private constructor(
10981091 private fun respondSuccess (result : String ) = viewModelScope.launch {
10991092 handledRequests + = sessionRequestId
11001093
1101- // Await the connection.
1102- connectionAvailabilityFlow.first { it }
1103-
11041094 SignClient .respond(
11051095 Sign .Params .Response (
11061096 sessionTopic = sessionRequestTopic,
11071097 jsonRpcResponse = Sign .Model .JsonRpcResponse .JsonRpcResult (
11081098 id = sessionRequestId,
11091099 result = result,
11101100 )
1111- )
1101+ ),
11121102 ) { error ->
11131103 Log .e(" failed_responding_success" , error.throwable)
11141104
@@ -1127,9 +1117,6 @@ private constructor(
11271117 ) = viewModelScope.launch {
11281118 handledRequests + = sessionRequestId
11291119
1130- // Await the connection.
1131- connectionAvailabilityFlow.first { it }
1132-
11331120 SignClient .respond(
11341121 Sign .Params .Response (
11351122 sessionTopic = sessionRequestTopic,
0 commit comments