PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/xrpl/dist/npm/models/transactions
Просмотр файла: clawback.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateClawback = void 0;
const errors_1 = require("../../errors");
const common_1 = require("./common");
function validateClawback(tx) {
(0, common_1.validateBaseTransaction)(tx);
if (tx.Amount == null) {
throw new errors_1.ValidationError('Clawback: missing field Amount');
}
if (!(0, common_1.isIssuedCurrency)(tx.Amount)) {
throw new errors_1.ValidationError('Clawback: invalid Amount');
}
if ((0, common_1.isIssuedCurrency)(tx.Amount) && tx.Account === tx.Amount.issuer) {
throw new errors_1.ValidationError('Clawback: invalid holder Account');
}
}
exports.validateClawback = validateClawback;
//# sourceMappingURL=clawback.js.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!