From 4aefac47ac6dac371d9077083b4f024c2d549b7a Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sun, 6 Oct 2024 15:46:22 +0400 Subject: [PATCH] Various fixes --- .../Sources/TelegramEngine/Payments/BotPaymentForm.swift | 2 -- .../TelegramCore/Sources/TelegramEngine/Payments/Stars.swift | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift index a00e0e0c84..e6592d112d 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/BotPaymentForm.swift @@ -703,8 +703,6 @@ func _internal_sendBotPaymentForm(account: Account, formId: Int64, source: BotPa return .fail(.paymentFailed) } else if error.errorDescription == "INVOICE_ALREADY_PAID" { return .fail(.alreadyPaid) - } else if error.errorDescription == "STARGIFT_USAGE_LIMITED" { - return .fail(.starGiftOutOfStock) } return .fail(.generic) } diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift b/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift index 6ae977572f..3e0ed0eab8 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Payments/Stars.swift @@ -1313,6 +1313,8 @@ func _internal_sendStarsPaymentForm(account: Account, formId: Int64, source: Bot return .fail(.alreadyPaid) } else if error.errorDescription == "MEDIA_ALREADY_PAID" { return .fail(.alreadyPaid) + } else if error.errorDescription == "STARGIFT_USAGE_LIMITED" { + return .fail(.starGiftOutOfStock) } return .fail(.generic) }