Skip to content

Commit 3302c9d

Browse files
committed
fix after merging main
1 parent fb7aa6f commit 3302c9d

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

BraintreeCore/src/main/java/com/braintreepayments/api/core/BraintreeClient.kt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@ import android.content.Context
44
import android.content.pm.ActivityInfo
55
import android.net.Uri
66
import androidx.annotation.RestrictTo
7-
import com.braintreepayments.api.sharedutils.HttpResponseCallback
87
import com.braintreepayments.api.sharedutils.HttpResponseTiming
98
import com.braintreepayments.api.sharedutils.ManifestValidator
109
import kotlinx.coroutines.CoroutineDispatcher
1110
import kotlinx.coroutines.CoroutineScope
1211
import kotlinx.coroutines.Dispatchers
1312
import kotlinx.coroutines.launch
14-
import org.json.JSONException
1513
import org.json.JSONObject
1614
import java.io.IOException
17-
import kotlin.coroutines.resume
18-
import kotlin.coroutines.resumeWithException
19-
import kotlin.coroutines.suspendCoroutine
2015

2116
/**
2217
* Core Braintree class that handles network requests.
@@ -173,16 +168,7 @@ class BraintreeClient internal constructor(
173168
* @suppress
174169
*/
175170
suspend fun sendGraphQLPOST(json: JSONObject): String {
176-
val configuration = suspendCoroutine { continuation ->
177-
getConfiguration { config, error ->
178-
if (config != null) {
179-
continuation.resume(config)
180-
} else {
181-
continuation.resumeWithException(error ?: Exception("Unknown configuration error"))
182-
}
183-
}
184-
}
185-
171+
val configuration = getConfiguration()
186172
val response = graphQLClient.post(
187173
data = json.toString(),
188174
configuration = configuration,

0 commit comments

Comments
 (0)