@superfluid-finance/sdk-core
Version:
SDK Core for building with Superfluid Protocol
17 lines • 895 B
JavaScript
import Operation from "./Operation";
export default 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(callAgreementOperation.populateTransactionPromise, callAgreementOperation.type, forwarderPopulatedTransactionPromise);
};
}
}
//# sourceMappingURL=SuperfluidAgreement.js.map