@openocean.finance/widget-sdk
Version:
OpenOcean Any-to-Any Cross-Chain-Swap SDK
29 lines • 793 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.executionState = void 0;
exports.executionState = {
state: {},
get(routeId) {
return this.state[routeId];
},
create(params) {
this.state[params.route.id] = {
...this.state[params.route.id],
...params,
executors: this.state[params.route.id]?.executors ?? [],
};
return this.state[params.route.id];
},
update(state) {
if (this.state[state.route.id]) {
this.state[state.route.id] = {
...this.state[state.route.id],
...state,
};
}
},
delete(routeId) {
delete this.state[routeId];
},
};
//# sourceMappingURL=executionState.js.map