nexushub-commands 1.5.3 → 1.5.5

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.
@@ -78,7 +78,7 @@ let DepositCommand = class DepositCommand extends evogram_1.Command {
78
78
  order = yield config.API.post(`orders`, {
79
79
  mirrorId: context.mammoth.mirror.mirror.id,
80
80
  mammothId: context.user.id,
81
- method: method === 'cryptoBot' ? 'crypto' : method,
81
+ method: method === 'cryptoWallet' ? 'crypto' : method,
82
82
  amount: Number(deposit),
83
83
  currency: config.currency,
84
84
  params: { walletId: coin },
@@ -117,7 +117,7 @@ let DepositCommand = class DepositCommand extends evogram_1.Command {
117
117
  : '',
118
118
  keyboard: [[{ text: '🚀 Оплатить счет', callback_data: `PaidOrderCommand?orderId=${order.id}` }]],
119
119
  });
120
- if (Number(deposit) !== Number(order.amount)) {
120
+ if (Number(deposit) !== Number(order.amount) && method !== 'cryptoWallet') {
121
121
  return context.sendFormatted({
122
122
  photo: config.images.deposit,
123
123
  header: `<blockquote><b>ℹ️ Сумма пополнения стала выше</b></blockquote>\n\n<i>Для определения вашего пополнения в системе, Вам придется заплатить ${Number(order.amount).toLocaleString('ru')} ${order.currency.toUpperCase()}. Приносим свои извинения за неудобства</i>`,
@@ -235,8 +235,6 @@ tslib_1.__decorate([
235
235
  name: 'deposit',
236
236
  question: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ context, error, args, validateArgs }) {
237
237
  var _b;
238
- if (args.method === 'cryptoWallet')
239
- return 1;
240
238
  const config = Client_1.Client.config(context);
241
239
  let minAmountSetting = JSON.parse(context.state.settings.find((x) => x.name === 'minDeposit').value);
242
240
  let minAmount = (_b = minAmountSetting[config.currency]) !== null && _b !== void 0 ? _b : (yield minAmountSetting['RUB'].convert({ from: 'RUB', to: config.currency }));
@@ -96,8 +96,8 @@ let GetDepositOrderCommand = class GetDepositOrderCommand extends evogram_1.Comm
96
96
  `<i>— Сумма пополнения: ${order.amount} ${order.currency}</i>\n` +
97
97
  `<i>— Курс: 1 ${order.currency} ≈ ${order.crypto.rate} ${order.crypto.currency}</i>\n\n` +
98
98
  `<i>— Сеть пополнения: ${order.crypto.wallet.currency.name} / ${order.crypto.wallet.network}</i>\n` +
99
- `<i>— Время пополнения: до ${new Date(order.expiresAt).toLocaleString('ru')} по МКС</i>\n\n` +
100
- `<b>${order.crypto.wallet.address}</b>`,
99
+ `<i>— Активно: до ${new Date(order.expiresAt).toLocaleString('ru')} по МКС</i>\n\n` +
100
+ `<code>${order.crypto.wallet.address}</code>`,
101
101
  }, {
102
102
  reply_markup: {
103
103
  inline_keyboard: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexushub-commands",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "main": "./lib/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -126,7 +126,6 @@ export class DepositCommand extends Command {
126
126
  {
127
127
  name: 'deposit',
128
128
  question: async ({ context, error, args, validateArgs }) => {
129
- if (args.method === 'cryptoWallet') return 1;
130
129
  const config = Client.config(context);
131
130
 
132
131
  let minAmountSetting = JSON.parse(context.state.settings.find((x: any) => x.name === 'minDeposit').value);
@@ -237,7 +236,7 @@ export class DepositCommand extends Command {
237
236
  order = await config.API.post(`orders`, {
238
237
  mirrorId: context.mammoth.mirror.mirror.id,
239
238
  mammothId: context.user.id,
240
- method: method === 'cryptoBot' ? 'crypto' : method,
239
+ method: method === 'cryptoWallet' ? 'crypto' : method,
241
240
  amount: Number(deposit),
242
241
  currency: config.currency,
243
242
  params: { walletId: coin },
@@ -289,7 +288,7 @@ export class DepositCommand extends Command {
289
288
  }
290
289
  );
291
290
 
292
- if (Number(deposit) !== Number(order.amount)) {
291
+ if (Number(deposit) !== Number(order.amount) && method !== 'cryptoWallet') {
293
292
  return context.sendFormatted(
294
293
  {
295
294
  photo: config.images.deposit,
@@ -108,9 +108,9 @@ export class GetDepositOrderCommand extends Command {
108
108
  `<i>— Курс: 1 ${order.currency} ≈ ${order.crypto.rate} ${order.crypto.currency}</i>\n\n` +
109
109
 
110
110
  `<i>— Сеть пополнения: ${order.crypto.wallet.currency.name} / ${order.crypto.wallet.network}</i>\n` +
111
- `<i>— Время пополнения: до ${new Date(order.expiresAt).toLocaleString('ru')} по МКС</i>\n\n` +
111
+ `<i>— Активно: до ${new Date(order.expiresAt).toLocaleString('ru')} по МКС</i>\n\n` +
112
112
 
113
- `<b>${order.crypto.wallet.address}</b>`,
113
+ `<code>${order.crypto.wallet.address}</code>`,
114
114
  },
115
115
  {
116
116
  reply_markup: {