nexushub-commands 1.5.6 → 1.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.
|
@@ -257,11 +257,11 @@ tslib_1.__decorate([
|
|
|
257
257
|
error: error === null || error === void 0 ? void 0 : error.message,
|
|
258
258
|
})).text;
|
|
259
259
|
}),
|
|
260
|
-
}, (0, evogram_1.numberValidator)({ allowFloat: true, min: 0 }), (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ value, context }) {
|
|
260
|
+
}, (0, evogram_1.numberValidator)({ allowFloat: true, min: 0 }), (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ value, context, validateArgs }) {
|
|
261
261
|
const config = Client_1.Client.config(context);
|
|
262
262
|
const maxDeposit = yield config.API.get('/config/maxDepositInService').then((x) => x.data.value);
|
|
263
263
|
const depositAmount = yield value.convert({ from: config.currency, to: 'RUB' });
|
|
264
|
-
if (depositAmount > maxDeposit)
|
|
264
|
+
if (depositAmount > maxDeposit && validateArgs.method !== 'cryptowallet')
|
|
265
265
|
throw new Error(`Пополнение, более чем на ${yield maxDeposit.convert({ from: 'RUB', to: config.currency })}, доступно только через <a href="t.me/{{ ${config.support.username} }}">тех. поддержку</a>`);
|
|
266
266
|
return value;
|
|
267
267
|
}), (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ value, context, validateArgs }) {
|
package/package.json
CHANGED
|
@@ -155,13 +155,13 @@ export class DepositCommand extends Command {
|
|
|
155
155
|
},
|
|
156
156
|
},
|
|
157
157
|
numberValidator({ allowFloat: true, min: 0 }),
|
|
158
|
-
async ({ value, context }) => {
|
|
158
|
+
async ({ value, context, validateArgs }) => {
|
|
159
159
|
const config = Client.config(context);
|
|
160
160
|
|
|
161
161
|
const maxDeposit = await config.API.get('/config/maxDepositInService').then((x) => x.data.value);
|
|
162
162
|
const depositAmount = await value.convert({ from: config.currency, to: 'RUB' });
|
|
163
163
|
|
|
164
|
-
if (depositAmount > maxDeposit)
|
|
164
|
+
if (depositAmount > maxDeposit && validateArgs.method !== 'cryptowallet')
|
|
165
165
|
throw new Error(
|
|
166
166
|
`Пополнение, более чем на ${await maxDeposit.convert({ from: 'RUB', to: config.currency })}, доступно только через <a href="t.me/{{ ${
|
|
167
167
|
config.support.username
|