diff options
author | John Preston <johnprestonmail@gmail.com> | 2024-07-17 10:38:50 +0200 |
---|---|---|
committer | John Preston <johnprestonmail@gmail.com> | 2024-07-31 17:03:53 +0200 |
commit | 5c797d1f316f7e9cca5a3a18f7b9712b22c9df3f (patch) | |
tree | 6fff0a47cdb5f0ecf7b815c8017c7a894acea238 /Telegram/SourceFiles/payments/payments_form.cpp | |
parent | f749616dd8851a8bf2471f6da4de9d6d49ae9282 (diff) |
Update API scheme to layer 185.
Diffstat (limited to 'Telegram/SourceFiles/payments/payments_form.cpp')
-rw-r--r-- | Telegram/SourceFiles/payments/payments_form.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Telegram/SourceFiles/payments/payments_form.cpp b/Telegram/SourceFiles/payments/payments_form.cpp index c09b41c363..e9dec016bd 100644 --- a/Telegram/SourceFiles/payments/payments_form.cpp +++ b/Telegram/SourceFiles/payments/payments_form.cpp @@ -318,20 +318,11 @@ MTPInputInvoice Form::inputInvoice() const { } else if (const auto slug = std::get_if<InvoiceSlug>(&_id.value)) { return MTP_inputInvoiceSlug(MTP_string(slug->slug)); } else if (const auto credits = std::get_if<InvoiceCredits>(&_id.value)) { - using Flag = MTPDstarsTopupOption::Flag; - const auto emptyFlag = MTPDstarsTopupOption::Flags(0); - return MTP_inputInvoiceStars(MTP_starsTopupOption( - MTP_flags(emptyFlag - | (credits->product.isEmpty() - ? Flag::f_store_product - : emptyFlag) - | (credits->extended - ? Flag::f_extended - : emptyFlag)), - MTP_long(credits->credits), - MTP_string(credits->product), - MTP_string(credits->currency), - MTP_long(credits->amount))); + return MTP_inputInvoiceStars( + MTP_inputStorePaymentStarsTopup( + MTP_long(credits->credits), + MTP_string(credits->currency), + MTP_long(credits->amount))); } const auto &giftCode = v::get<InvoicePremiumGiftCode>(_id.value); using Flag = MTPDpremiumGiftCodeOption::Flag; |