mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Star gifts API
This commit is contained in:
@@ -51,8 +51,14 @@ public final class BotCheckoutController: ViewController {
|
||||
return .generic
|
||||
}
|
||||
|> mapToSignal { paymentForm -> Signal<InputData, FetchError> in
|
||||
return context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: paymentForm.paymentBotId))
|
||||
|> castError(FetchError.self)
|
||||
let botPeer: Signal<EnginePeer?, FetchError>
|
||||
if let paymentBotId = paymentForm.paymentBotId {
|
||||
botPeer = context.engine.data.get(TelegramEngine.EngineData.Item.Peer.Peer(id: paymentBotId))
|
||||
|> castError(FetchError.self)
|
||||
} else {
|
||||
botPeer = .single(nil)
|
||||
}
|
||||
return botPeer
|
||||
|> mapToSignal { botPeer -> Signal<InputData, FetchError> in
|
||||
if let current = paymentForm.savedInfo {
|
||||
return context.engine.payments.validateBotPaymentForm(saveInfo: true, source: source, formInfo: current)
|
||||
|
||||
Reference in New Issue
Block a user