Skip to content

Commit

Permalink
fix: remove kotlin forEach call
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecruzan-stripe committed Sep 14, 2023
1 parent c8d593c commit 0d52324
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -807,11 +807,8 @@ internal fun mapFromSetupIntentResult(setupIntent: SetupIntent): WritableMap {
map.putMap("lastSetupError", setupError)
}

setupIntent.paymentMethodTypes.forEach { code ->
val type: PaymentMethod.Type? = PaymentMethod.Type.values().find {
code == it.code
}
type?.let {
for (code in setupIntent.paymentMethodTypes) {
PaymentMethod.Type.fromCode(code)?.let {
paymentMethodTypes.pushString(mapPaymentMethodType(it))
}
}
Expand Down

0 comments on commit 0d52324

Please sign in to comment.