Skip to content

Commit

Permalink
fix(invoice): Bot API 7.4 removed provider_token
Browse files Browse the repository at this point in the history
BREAKING CHANGE: required argument is gone now
  • Loading branch information
EdJoPaTo committed Jun 1, 2024
1 parent ff7f7ee commit bcbb79b
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion source/body.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ const EXAMPLE_INVOICE: InvoiceBody = {
description: 'B',
currency: 'EUR',
payload: 'D',
provider_token: 'E',
prices: [],
},
};
Expand Down
1 change: 0 additions & 1 deletion source/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export type InvoiceBody = {
readonly title: string;
readonly description: string;
readonly payload: string;
readonly provider_token: string;
readonly currency: string;
readonly prices: ReadonlyArray<Readonly<LabeledPrice>>;
};
Expand Down
2 changes: 0 additions & 2 deletions source/send-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ async function replyRenderedMenuPartsToContext<Context extends BaseContext>(
body.invoice.title,
body.invoice.description,
body.invoice.payload,
body.invoice.provider_token,
body.invoice.currency,
body.invoice.prices,
createGenericOther(keyboard, other),
Expand Down Expand Up @@ -315,7 +314,6 @@ export function generateSendMenuToChatFunction<Context>(
body.invoice.title,
body.invoice.description,
body.invoice.payload,
body.invoice.provider_token,
body.invoice.currency,
body.invoice.prices,
createGenericOther(keyboard, other),
Expand Down
3 changes: 0 additions & 3 deletions test/send-menu/context-edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ await test('context-edit invoice reply', async t => {
description: 'B',
currency: 'EUR',
payload: 'D',
provider_token: 'E',
prices: [],
},
});
Expand All @@ -612,7 +611,6 @@ await test('context-edit invoice reply', async t => {
title,
description,
payload,
provider_token,
currency,
prices,
other,
Expand All @@ -621,7 +619,6 @@ await test('context-edit invoice reply', async t => {
strictEqual(description, 'B');
strictEqual(currency, 'EUR');
strictEqual(payload, 'D');
strictEqual(provider_token, 'E');
deepStrictEqual(prices, []);
deepStrictEqual(other, {
reply_markup: {
Expand Down
1 change: 0 additions & 1 deletion test/send-menu/telegram-edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ await test('telegram-edit invoice', async () => {
description: 'B',
currency: 'EUR',
payload: 'D',
provider_token: 'E',
prices: [],
},
});
Expand Down
3 changes: 0 additions & 3 deletions test/send-menu/telegram-send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ await test('telegram-send invoice', async () => {
description: 'B',
currency: 'EUR',
payload: 'D',
provider_token: 'E',
prices: [],
},
});
Expand All @@ -198,7 +197,6 @@ await test('telegram-send invoice', async () => {
title,
description,
payload,
provider_token,
currency,
prices,
other,
Expand All @@ -208,7 +206,6 @@ await test('telegram-send invoice', async () => {
strictEqual(description, 'B');
strictEqual(currency, 'EUR');
strictEqual(payload, 'D');
strictEqual(provider_token, 'E');
deepStrictEqual(prices, []);
deepStrictEqual(other, {
reply_markup: {
Expand Down

0 comments on commit bcbb79b

Please sign in to comment.