Various fixes

This commit is contained in:
Ilya Laktyushin
2022-07-22 17:46:09 +03:00
parent 237f86f7ca
commit e1b4af1461
27 changed files with 329 additions and 111 deletions

View File

@@ -17,6 +17,7 @@ enum BotCheckoutPaymentMethod: Equatable {
case savedCredentials(BotPaymentSavedCredentials)
case webToken(BotCheckoutPaymentWebToken)
case applePay
case other(BotPaymentMethod)
var title: String {
switch self {
@@ -29,6 +30,8 @@ enum BotCheckoutPaymentMethod: Equatable {
return token.title
case .applePay:
return "Apple Pay"
case let .other(method):
return method.title
}
}
}
@@ -68,6 +71,9 @@ final class BotCheckoutPaymentMethodSheetController: ActionSheetController {
case .applePay:
title = "Apple Pay"
icon = UIImage(bundleImageName: "Bot Payments/ApplePayLogo")?.precomposed()
case let .other(method):
title = method.title
icon = nil
}
let value: Bool?
if let currentMethod = currentMethod {