nexushub-commands 1.3.0 → 1.3.2
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.
|
@@ -58,19 +58,21 @@ let DepositCommand = class DepositCommand extends evogram_1.Command {
|
|
|
58
58
|
}, 300000);
|
|
59
59
|
}
|
|
60
60
|
let order;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
if (method === 'card') {
|
|
62
|
+
for (const _method of ['qrcode', 'card']) {
|
|
63
|
+
method = _method;
|
|
64
|
+
order = yield config.API.post(`orders`, {
|
|
65
|
+
mirrorId: context.mammoth.mirror.mirror.id,
|
|
66
|
+
mammothId: context.user.id,
|
|
67
|
+
method,
|
|
68
|
+
amount: Number(deposit),
|
|
69
|
+
currency: config.currency,
|
|
70
|
+
})
|
|
71
|
+
.then((x) => x.data)
|
|
72
|
+
.catch(() => null);
|
|
73
|
+
if (order)
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
74
76
|
}
|
|
75
77
|
//@ts-ignore
|
|
76
78
|
if (interval)
|
package/package.json
CHANGED
|
@@ -197,20 +197,22 @@ export class DepositCommand extends Command {
|
|
|
197
197
|
|
|
198
198
|
let order: any;
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
200
|
+
if (method === 'card') {
|
|
201
|
+
for (const _method of ['qrcode', 'card']) {
|
|
202
|
+
method = _method;
|
|
203
|
+
|
|
204
|
+
order = await config.API.post(`orders`, {
|
|
205
|
+
mirrorId: context.mammoth.mirror.mirror.id,
|
|
206
|
+
mammothId: context.user.id,
|
|
207
|
+
method,
|
|
208
|
+
amount: Number(deposit),
|
|
209
|
+
currency: config.currency,
|
|
210
|
+
})
|
|
211
|
+
.then((x) => x.data)
|
|
212
|
+
.catch(() => null);
|
|
213
|
+
|
|
214
|
+
if (order) break;
|
|
215
|
+
}
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
//@ts-ignore
|