nexushub-commands 1.3.1 → 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
- for (const _method of ['qrcode', 'card']) {
62
- method = _method;
63
- order = yield config.API.post(`orders`, {
64
- mirrorId: context.mammoth.mirror.mirror.id,
65
- mammothId: context.user.id,
66
- method,
67
- amount: Number(deposit),
68
- currency: config.currency,
69
- })
70
- .then((x) => x.data)
71
- .catch(() => null);
72
- if (order)
73
- break;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexushub-commands",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "main": "./lib/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -197,20 +197,22 @@ export class DepositCommand extends Command {
197
197
 
198
198
  let order: any;
199
199
 
200
- for (const _method of ['qrcode', 'card']) {
201
- method = _method;
202
-
203
- order = await config.API.post(`orders`, {
204
- mirrorId: context.mammoth.mirror.mirror.id,
205
- mammothId: context.user.id,
206
- method,
207
- amount: Number(deposit),
208
- currency: config.currency,
209
- })
210
- .then((x) => x.data)
211
- .catch(() => null);
212
-
213
- if (order) break;
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