nexushub-commands 2.6.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -343,6 +343,7 @@ tslib_1.__decorate([
343
343
  const keyboard = [
344
344
  buttons.slice(0, 3), // Первый ряд
345
345
  buttons.slice(3, 6), // Второй ряд
346
+ [{ text: 'Своя сумма', command: DepositCommand, payload: Object.assign(Object.assign({}, args), { suggestedDepositAmounts: false }) }],
346
347
  ].filter((row) => row.length > 0); // Убираем пустые ряды
347
348
  return (yield context.sendFormattedQuestion({
348
349
  //@ts-ignore
@@ -352,7 +353,7 @@ tslib_1.__decorate([
352
353
  error: error === null || error === void 0 ? void 0 : error.message,
353
354
  }, {
354
355
  reply_markup: {
355
- inline_keyboard: keyboard,
356
+ inline_keyboard: args.suggestedDepositAmounts === false ? undefined : keyboard,
356
357
  },
357
358
  })).text;
358
359
  }),
@@ -25,6 +25,7 @@ let GetDepositOrderCommand = class GetDepositOrderCommand extends evogram_1.Comm
25
25
  {
26
26
  title: 'ℹ️ Информация о счете',
27
27
  data: [
28
+ ['ID', `{{ ${order.id} }}`],
28
29
  ['Сумма', `{{ ${Number(order.amount).toLocaleString('ru')} ${order.currency} }}`],
29
30
  ['Дата', `{{ ${new Date().toLocaleString('ru')} }}`],
30
31
  ],
@@ -49,7 +50,7 @@ let GetDepositOrderCommand = class GetDepositOrderCommand extends evogram_1.Comm
49
50
  body: [
50
51
  {
51
52
  title: 'ℹ️ Информация о реквизитах',
52
- data: [['Реквизиты', `{{ ${order.card.requisites} }}`], order.card.bank && ['Банк', `{{ ${order.card.bank} }}`], order.card.holder && ['Получатель', `{{ ${order.card.holder} }}`], ['Сумма оплаты', `{{ ${Number(order.amount).toLocaleString('ru')} ${order.currency} }}`]],
53
+ data: [['ID', `{{ ${order.id} }}`], ['Реквизиты', `{{ ${order.card.requisites} }}`], order.card.bank && ['Банк', `{{ ${order.card.bank} }}`], order.card.holder && ['Получатель', `{{ ${order.card.holder} }}`], ['Сумма оплаты', `{{ ${Number(order.amount).toLocaleString('ru')} ${order.currency} }}`]],
53
54
  },
54
55
  ],
55
56
  footer: '<i>Реквизиты действительны 10 минут.</i>',
@@ -69,7 +70,7 @@ let GetDepositOrderCommand = class GetDepositOrderCommand extends evogram_1.Comm
69
70
  designImages: order.qrcode.qrcode ? undefined : ['deposit-qrcode', 'deposit'],
70
71
  photo: order.qrcode.qrcode || config.images.deposit,
71
72
  // prettier-ignore
72
- header: '<blockquote><b>📥 Создана заявка на пополнение</b></blockquote>' +
73
+ header: `<blockquote><b>📥 Создана заявка на пополнение [ID {{ ${order.id} }}]</b></blockquote>` +
73
74
  (!order.qrcode.link ? '\n\n<b>Сохраните данный QR-код на устройство и загрузите его в приложение банка для оплаты.</b>' : ''),
74
75
  footer: `<i>Заявка действительна ${Math.ceil((new Date(order.expiresAt).getTime() - new Date().getTime()) / 60000)} минут.</i>`,
75
76
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexushub-commands",
3
- "version": "2.6.1",
3
+ "version": "2.7.0",
4
4
  "main": "./lib/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -236,6 +236,7 @@ export class DepositCommand extends Command {
236
236
  const keyboard = [
237
237
  buttons.slice(0, 3), // Первый ряд
238
238
  buttons.slice(3, 6), // Второй ряд
239
+ [{ text: 'Своя сумма', command: DepositCommand, payload: { ...args, suggestedDepositAmounts: false } }],
239
240
  ].filter((row) => row.length > 0) // Убираем пустые ряды
240
241
 
241
242
  return (
@@ -249,7 +250,7 @@ export class DepositCommand extends Command {
249
250
  },
250
251
  {
251
252
  reply_markup: {
252
- inline_keyboard: keyboard,
253
+ inline_keyboard: args.suggestedDepositAmounts === false ? undefined : keyboard,
253
254
  },
254
255
  },
255
256
  )
@@ -25,6 +25,7 @@ export class GetDepositOrderCommand extends Command {
25
25
  {
26
26
  title: 'ℹ️ Информация о счете',
27
27
  data: [
28
+ ['ID', `{{ ${order.id} }}`],
28
29
  ['Сумма', `{{ ${Number(order.amount).toLocaleString('ru')} ${order.currency} }}`],
29
30
  ['Дата', `{{ ${new Date().toLocaleString('ru')} }}`],
30
31
  ],
@@ -40,7 +41,7 @@ export class GetDepositOrderCommand extends Command {
40
41
  reply_markup: {
41
42
  inline_keyboard: [[{ text: '🔗 Перейти к оплате', url: order.cryptoBot.url }], [{ text: '🔄 Проверить оплату', command: CheckPaidOrderCommand, payload: { orderId: order.id } }]],
42
43
  },
43
- }
44
+ },
44
45
  )
45
46
 
46
47
  break
@@ -53,7 +54,7 @@ export class GetDepositOrderCommand extends Command {
53
54
  body: [
54
55
  {
55
56
  title: 'ℹ️ Информация о реквизитах',
56
- data: [['Реквизиты', `{{ ${order.card.requisites} }}`], order.card.bank && ['Банк', `{{ ${order.card.bank} }}`], order.card.holder && ['Получатель', `{{ ${order.card.holder} }}`], ['Сумма оплаты', `{{ ${Number(order.amount).toLocaleString('ru')} ${order.currency} }}`]],
57
+ data: [['ID', `{{ ${order.id} }}`], ['Реквизиты', `{{ ${order.card.requisites} }}`], order.card.bank && ['Банк', `{{ ${order.card.bank} }}`], order.card.holder && ['Получатель', `{{ ${order.card.holder} }}`], ['Сумма оплаты', `{{ ${Number(order.amount).toLocaleString('ru')} ${order.currency} }}`]],
57
58
  },
58
59
  ],
59
60
  footer: '<i>Реквизиты действительны 10 минут.</i>',
@@ -67,7 +68,7 @@ export class GetDepositOrderCommand extends Command {
67
68
  ],
68
69
  ],
69
70
  },
70
- }
71
+ },
71
72
  )
72
73
  break
73
74
  case 'qrcode':
@@ -77,7 +78,7 @@ export class GetDepositOrderCommand extends Command {
77
78
  photo: order.qrcode.qrcode || config.images.deposit,
78
79
  // prettier-ignore
79
80
  header:
80
- '<blockquote><b>📥 Создана заявка на пополнение</b></blockquote>' +
81
+ `<blockquote><b>📥 Создана заявка на пополнение [ID {{ ${order.id} }}]</b></blockquote>` +
81
82
 
82
83
  (!order.qrcode.link ? '\n\n<b>Сохраните данный QR-код на устройство и загрузите его в приложение банка для оплаты.</b>' : ''),
83
84
  footer: `<i>Заявка действительна ${Math.ceil((new Date(order.expiresAt).getTime() - new Date().getTime()) / 60000)} минут.</i>`,
@@ -92,7 +93,7 @@ export class GetDepositOrderCommand extends Command {
92
93
  ],
93
94
  ],
94
95
  },
95
- }
96
+ },
96
97
  )
97
98
  break
98
99
  case 'crypto':
@@ -122,7 +123,7 @@ export class GetDepositOrderCommand extends Command {
122
123
  ],
123
124
  ],
124
125
  },
125
- }
126
+ },
126
127
  )
127
128
  break
128
129
  }