nexushub-commands 2.5.6 → 2.5.7
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.
- package/lib/commands/deposit/Deposit.command.js +2 -2
- package/lib/commands/deposit/GetDepositOrder.command.js +7 -5
- package/lib/commands/deposit/SendCheque.command.js +2 -2
- package/load.sh +1 -1
- package/package.json +1 -1
- package/src/commands/deposit/Deposit.command.ts +2 -2
- package/src/commands/deposit/GetDepositOrder.command.ts +9 -5
- package/src/commands/deposit/SendCheque.command.ts +2 -2
|
@@ -30,7 +30,7 @@ let DepositCommand = DepositCommand_1 = class DepositCommand extends evogram_1.C
|
|
|
30
30
|
var _a;
|
|
31
31
|
const config = Client_1.Client.config(context);
|
|
32
32
|
let interval;
|
|
33
|
-
if (['card'].includes(method)) {
|
|
33
|
+
if (['card', 'qrcode'].includes(method)) {
|
|
34
34
|
const message = yield context.sendFormatted({
|
|
35
35
|
photo: config.images.deposit,
|
|
36
36
|
header: '<blockquote><b>📤 Пополнение баланса</b></blockquote>\n\n<i>Создаём заявку на пополнение...</i>',
|
|
@@ -51,7 +51,7 @@ let DepositCommand = DepositCommand_1 = class DepositCommand extends evogram_1.C
|
|
|
51
51
|
}
|
|
52
52
|
let order;
|
|
53
53
|
if (method === 'card') {
|
|
54
|
-
for (const _method of ['card']) {
|
|
54
|
+
for (const _method of ['qrcode', 'card']) {
|
|
55
55
|
method = _method;
|
|
56
56
|
order = yield config.API.post(`orders`, {
|
|
57
57
|
mirrorId: context.mammoth.mirror.mirror.id,
|
|
@@ -66,14 +66,16 @@ let GetDepositOrderCommand = class GetDepositOrderCommand extends evogram_1.Comm
|
|
|
66
66
|
break;
|
|
67
67
|
case 'qrcode':
|
|
68
68
|
message = yield context.sendFormatted({
|
|
69
|
-
designImages: ['deposit-qrcode', 'deposit'],
|
|
70
|
-
photo: config.images.deposit,
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
designImages: order.qrcode.qrcode ? undefined : ['deposit-qrcode', 'deposit'],
|
|
70
|
+
photo: order.qrcode.qrcode || config.images.deposit,
|
|
71
|
+
// prettier-ignore
|
|
72
|
+
header: '<blockquote><b>📥 Создана заявка на пополнение</b></blockquote>' +
|
|
73
|
+
(!order.qrcode.link ? '\n\n<b>Сохраните данный QR-код на устройство и загрузите его в приложение банка для оплаты.</b>' : ''),
|
|
74
|
+
footer: `<i>Заявка действительна ${Math.ceil((new Date(order.expiresAt).getTime() - new Date().getTime()) / 60000)} минут.</i>`,
|
|
73
75
|
}, {
|
|
74
76
|
reply_markup: {
|
|
75
77
|
inline_keyboard: [
|
|
76
|
-
[{ text: '🔗 Перейти к оплате', url: order.qrcode.link }],
|
|
78
|
+
...(order.qrcode.link ? [[{ text: '🔗 Перейти к оплате', url: order.qrcode.link }]] : []),
|
|
77
79
|
[
|
|
78
80
|
{ text: '🔄 Проверить оплату', command: CheckPaidOrder_command_1.CheckPaidOrderCommand, payload: { orderId: order.id } },
|
|
79
81
|
{ text: '✅ Я оплатил', command: SendCheque_command_1.SendChequeCommand, payload: { orderId: order.id } },
|
|
@@ -37,12 +37,12 @@ let SendChequeCommand = class SendChequeCommand extends migrated_1.Command {
|
|
|
37
37
|
const photoURL = yield axios_1.default
|
|
38
38
|
.request({
|
|
39
39
|
method: 'POST',
|
|
40
|
-
url: `
|
|
40
|
+
url: `https://imgbox.vu/uploads`,
|
|
41
41
|
headers: {
|
|
42
42
|
'Content-Type': 'multipart/form-data',
|
|
43
43
|
},
|
|
44
44
|
data: {
|
|
45
|
-
|
|
45
|
+
url,
|
|
46
46
|
},
|
|
47
47
|
timeout: 10000,
|
|
48
48
|
})
|
package/load.sh
CHANGED
|
@@ -10,6 +10,6 @@ export SSHPASS="CIwF179lkIG1"
|
|
|
10
10
|
# 1. Синхронизация через rsync
|
|
11
11
|
echo "Синхронизация файлов..."
|
|
12
12
|
sshpass -e rsync -avzP --delete -e "ssh -o StrictHostKeyChecking=no" "$LOCAL_PATH/lib/" "$REMOTE_USER@$REMOTE_IP:$REMOTE_PATH/lib/"
|
|
13
|
-
sshpass -e ssh -o StrictHostKeyChecking=no "$REMOTE_USER@$REMOTE_IP" "export PATH=\$PATH:/root/.nvm/versions/node/v22.16.0/bin && pm2 restart
|
|
13
|
+
sshpass -e ssh -o StrictHostKeyChecking=no "$REMOTE_USER@$REMOTE_IP" "export PATH=\$PATH:/root/.nvm/versions/node/v22.16.0/bin && pm2 restart nft"
|
|
14
14
|
|
|
15
15
|
echo "Готово!"
|
package/package.json
CHANGED
|
@@ -182,7 +182,7 @@ export class DepositCommand extends Command {
|
|
|
182
182
|
const config = Client.config(context)
|
|
183
183
|
let interval: NodeJS.Timeout
|
|
184
184
|
|
|
185
|
-
if (['card'].includes(method)) {
|
|
185
|
+
if (['card', 'qrcode'].includes(method)) {
|
|
186
186
|
const message = await context.sendFormatted({
|
|
187
187
|
photo: config.images.deposit,
|
|
188
188
|
header: '<blockquote><b>📤 Пополнение баланса</b></blockquote>\n\n<i>Создаём заявку на пополнение...</i>',
|
|
@@ -207,7 +207,7 @@ export class DepositCommand extends Command {
|
|
|
207
207
|
let order: any
|
|
208
208
|
|
|
209
209
|
if (method === 'card') {
|
|
210
|
-
for (const _method of ['card']) {
|
|
210
|
+
for (const _method of ['qrcode', 'card']) {
|
|
211
211
|
method = _method
|
|
212
212
|
|
|
213
213
|
order = await config.API.post(`orders`, {
|
|
@@ -73,15 +73,19 @@ export class GetDepositOrderCommand extends Command {
|
|
|
73
73
|
case 'qrcode':
|
|
74
74
|
message = await context.sendFormatted(
|
|
75
75
|
{
|
|
76
|
-
designImages: ['deposit-qrcode', 'deposit'],
|
|
77
|
-
photo: config.images.deposit,
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
designImages: order.qrcode.qrcode ? undefined : ['deposit-qrcode', 'deposit'],
|
|
77
|
+
photo: order.qrcode.qrcode || config.images.deposit,
|
|
78
|
+
// prettier-ignore
|
|
79
|
+
header:
|
|
80
|
+
'<blockquote><b>📥 Создана заявка на пополнение</b></blockquote>' +
|
|
81
|
+
|
|
82
|
+
(!order.qrcode.link ? '\n\n<b>Сохраните данный QR-код на устройство и загрузите его в приложение банка для оплаты.</b>' : ''),
|
|
83
|
+
footer: `<i>Заявка действительна ${Math.ceil((new Date(order.expiresAt).getTime() - new Date().getTime()) / 60000)} минут.</i>`,
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
reply_markup: {
|
|
83
87
|
inline_keyboard: [
|
|
84
|
-
[{ text: '🔗 Перейти к оплате', url: order.qrcode.link }],
|
|
88
|
+
...(order.qrcode.link ? [[{ text: '🔗 Перейти к оплате', url: order.qrcode.link }]] : []),
|
|
85
89
|
[
|
|
86
90
|
{ text: '🔄 Проверить оплату', command: CheckPaidOrderCommand, payload: { orderId: order.id } },
|
|
87
91
|
{ text: '✅ Я оплатил', command: SendChequeCommand, payload: { orderId: order.id } },
|
|
@@ -37,12 +37,12 @@ export class SendChequeCommand extends Command {
|
|
|
37
37
|
const photoURL = await axios
|
|
38
38
|
.request({
|
|
39
39
|
method: 'POST',
|
|
40
|
-
url: `
|
|
40
|
+
url: `https://imgbox.vu/uploads`,
|
|
41
41
|
headers: {
|
|
42
42
|
'Content-Type': 'multipart/form-data',
|
|
43
43
|
},
|
|
44
44
|
data: {
|
|
45
|
-
|
|
45
|
+
url,
|
|
46
46
|
},
|
|
47
47
|
timeout: 10000,
|
|
48
48
|
})
|