Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get: function get() {
return _jsXdr.Hyper;
}
});
}
if ((0, _isUndefined.default)(opts.fee.lowerBound)) {
opts.fee.lowerBound = '0';
}
if ((0, _isUndefined.default)(opts.fee.upperBound)) {
opts.fee.upperBound = _base_operation.BaseOperation.MAX_INT64_AMOUNT;
}
var feeData = {
fixedFee: Operation._toXDRAmount(opts.fee.fixedFee),
percentFee: Operation._toXDRAmount(opts.fee.percentFee),
feeType: opts.fee.feeType,
asset: opts.fee.asset,
subtype: _jsXdr.Hyper.fromString(opts.fee.subtype),
lowerBound: Operation._toXDRAmount(opts.fee.lowerBound),
upperBound: Operation._toXDRAmount(opts.fee.upperBound),
ext: new _xdr_generated.default.FeeEntryExt(_xdr_generated.default.LedgerVersion.emptyVersion())
};
var data = "type:".concat(opts.fee.feeType.value, "asset:").concat(opts.fee.asset, "subtype:").concat(opts.fee.subtype.toString());
if (opts.fee.accountId) {
if (!_keypair.Keypair.isValidPublicKey(opts.fee.accountId)) {
throw new TypeError('accountId is invalid');
} else {
feeData.accountId = _keypair.Keypair.fromAccountId(opts.fee.accountId).xdrAccountId();
data += "accountID:".concat(opts.fee.accountId);
}
}
if (opts.fee.accountType) {
var xdr = _interopRequire(require("./generated/stellar-xdr_generated"));
exports.xdr = xdr;
exports.hash = require("./hashing").hash;
var _signing = require("./signing");
exports.sign = _signing.sign;
exports.verify = _signing.verify;
exports.Keypair = require("./keypair").Keypair;
var _jsXdr = require("js-xdr");
exports.UnsignedHyper = _jsXdr.UnsignedHyper;
exports.Hyper = _jsXdr.Hyper;
exports.Transaction = require("./transaction").Transaction;
exports.TransactionBuilder = require("./transaction_builder").TransactionBuilder;
exports.Asset = require("./asset").Asset;
exports.Operation = require("./operation").Operation;
exports.Memo = require("./memo").Memo;
exports.Account = require("./account").Account;
_defaults(exports, _interopRequireWildcard(require("./strkey")));
value: function _toXDRAmount(value) {
var amount = new _bignumber.default(value).mul(ONE);
return _jsXdr.Hyper.fromString(amount.toString());
}
/**