UNPKG

@lifi/sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

27 lines 987 B
import { StatusManager } from './StatusManager.js'; // Please be careful when changing the defaults as it may break the behavior (e.g., background execution) const defaultInteractionSettings = { allowInteraction: true, allowUpdates: true, allowExecution: true, }; export class BaseStepExecutor { executionOptions; statusManager; allowUserInteraction = true; allowExecution = true; constructor(options) { this.statusManager = new StatusManager(options.routeId); this.executionOptions = options.executionOptions; } setInteraction = (settings) => { const interactionSettings = { ...defaultInteractionSettings, ...settings, }; this.allowUserInteraction = interactionSettings.allowInteraction; this.statusManager.allowUpdates(interactionSettings.allowUpdates); this.allowExecution = interactionSettings.allowExecution; }; } //# sourceMappingURL=BaseStepExecutor.js.map