@superfluid-finance/sdk-core
Version:
SDK Core for building with Superfluid Protocol
23 lines • 1.17 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Operation_1 = __importDefault(require("./Operation"));
class SuperfluidAgreement {
constructor() {
/**
* Returns the desired Operation based on shouldUseCallAgreement.
* @param shouldUseCallAgreement whether or not to use host.callAgreement
* @param callAgreementOperation the host.callAgreement created Operation
* @param forwarderPopulatedTransactionPromise the populated forwarder transaction promise
*/
this._getCallAgreementOperation = (callAgreementOperation, forwarderPopulatedTransactionPromise, shouldUseCallAgreement) => {
return shouldUseCallAgreement
? callAgreementOperation
: new Operation_1.default(callAgreementOperation.populateTransactionPromise, callAgreementOperation.type, forwarderPopulatedTransactionPromise);
};
}
}
exports.default = SuperfluidAgreement;
//# sourceMappingURL=SuperfluidAgreement.js.map
;