[WIP] Channel appearance

This commit is contained in:
Isaac
2023-12-15 15:13:40 +04:00
parent 200a2864a9
commit b66f748969
50 changed files with 3063 additions and 327 deletions

View File

@@ -903,10 +903,17 @@ final class BotCheckoutControllerNode: ItemListControllerNode, PKPaymentAuthoriz
guard let publicToken = nativeParams["public_token"] as? String else {
return
}
var customTokenizeUrl: String?
if let value = nativeParams["public_token"] as? String, let url = URL(string: value), let host = url.host {
if url.scheme == "https" && (host == "smart-glocal.com" || host.hasSuffix(".smart-glocal.com")) {
customTokenizeUrl = value
}
}
var dismissImpl: (() -> Void)?
let canSave = paymentForm.canSaveCredentials || paymentForm.passwordMissing
let controller = BotCheckoutNativeCardEntryController(context: strongSelf.context, provider: .smartglobal(isTesting: paymentForm.invoice.isTest, publicToken: publicToken), completion: { method in
let controller = BotCheckoutNativeCardEntryController(context: strongSelf.context, provider: .smartglobal(isTesting: paymentForm.invoice.isTest, publicToken: publicToken, customTokenizeUrl: customTokenizeUrl), completion: { method in
guard let strongSelf = self else {
return
}