Refactoring

This commit is contained in:
Ali
2021-04-26 02:00:48 +04:00
parent bc108d8dc1
commit 1b48517f12
126 changed files with 407 additions and 377 deletions

View File

@@ -36,13 +36,13 @@ public final class BotCheckoutController: ViewController {
"button_text_color": Int32(bitPattern: presentationData.theme.list.itemCheckColors.foregroundColor.argb)
]
return fetchBotPaymentForm(postbox: context.account.postbox, network: context.account.network, messageId: messageId, themeParams: themeParams)
return context.engine.payments.fetchBotPaymentForm(messageId: messageId, themeParams: themeParams)
|> mapError { _ -> FetchError in
return .generic
}
|> mapToSignal { paymentForm -> Signal<InputData, FetchError> in
if let current = paymentForm.savedInfo {
return validateBotPaymentForm(account: context.account, saveInfo: true, messageId: messageId, formInfo: current)
return context.engine.payments.validateBotPaymentForm(saveInfo: true, messageId: messageId, formInfo: current)
|> mapError { _ -> FetchError in
return .generic
}