Skip to content

Commit

Permalink
Display 4 logos on drop-in payment methods list for Pay by Bank US
Browse files Browse the repository at this point in the history
COAND-974
  • Loading branch information
ozgur00 committed Nov 12, 2024
1 parent ddee485 commit 7d7d0ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ internal class PaymentMethodsListViewModel(

private fun makeBrandList(): List<LogoTextItem> {
return listOf(
PayByBankUSBrandLogo.entries.take(PAY_BY_BANK_BRAND_LOGO_SIZE).map {
PayByBankUSBrandLogo.entries.map {
LogoItem(
it.path,
dropInParams.environment,
Expand All @@ -279,7 +279,6 @@ internal class PaymentMethodsListViewModel(
companion object {
private const val CARD_LOGO_TYPE = "card"
private const val GOOGLE_PAY_LOGO_TYPE = PaymentMethodTypes.GOOGLE_PAY
private const val PAY_BY_BANK_BRAND_LOGO_SIZE = 3
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ internal class DefaultPayByBankUSDelegate(
override fun getPaymentMethodType(): String = paymentMethod.type ?: PaymentMethodTypes.UNKNOWN

private fun createOutputData() = PayByBankUSOutputData(
brandList = getBrandList()
brandList = getBrandList(),
)

private fun createComponentState(): PayByBankUSComponentState {
Expand Down Expand Up @@ -142,11 +142,13 @@ internal class DefaultPayByBankUSDelegate(

private fun getBrandList(): List<LogoTextItem> {
return listOf(
LogoItem(PayByBankUSBrandLogo.US_1.path, componentParams.environment),
LogoItem(PayByBankUSBrandLogo.US_2.path, componentParams.environment),
LogoItem(PayByBankUSBrandLogo.US_3.path, componentParams.environment),
LogoItem(PayByBankUSBrandLogo.US_4.path, componentParams.environment),
TextItem(R.string.checkout_pay_by_bank_us_more),
)
PayByBankUSBrandLogo.entries.map {
LogoItem(
it.path,
componentParams.environment,
)
},
listOf(TextItem(R.string.checkout_pay_by_bank_us_more)),
).flatten()
}
}

0 comments on commit 7d7d0ed

Please sign in to comment.