@vesper85/strategy-sdk 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2281,10 +2281,6 @@ var PolymarketEventRunner = class {
|
|
|
2281
2281
|
* Dispatch an event to the strategy's onEvent handler
|
|
2282
2282
|
*/
|
|
2283
2283
|
async dispatchEvent(event) {
|
|
2284
|
-
const eventStart = Date.now();
|
|
2285
|
-
this.config.logger.debug(
|
|
2286
|
-
`Dispatching ${event.type} event${event.market ? ` for ${event.market}` : ""}`
|
|
2287
|
-
);
|
|
2288
2284
|
try {
|
|
2289
2285
|
if (this.strategy.onEvent) {
|
|
2290
2286
|
await this.strategy.onEvent(event, this.context);
|
|
@@ -2295,8 +2291,6 @@ var PolymarketEventRunner = class {
|
|
|
2295
2291
|
error
|
|
2296
2292
|
);
|
|
2297
2293
|
}
|
|
2298
|
-
const eventDuration = Date.now() - eventStart;
|
|
2299
|
-
this.config.logger.debug(`Event handling completed in ${eventDuration}ms`);
|
|
2300
2294
|
}
|
|
2301
2295
|
};
|
|
2302
2296
|
function createPolymarketEventRunner(strategy, config, context) {
|
|
@@ -2648,11 +2642,7 @@ var OsirisEventRunner = class {
|
|
|
2648
2642
|
* Dispatch an event to the strategy's onEvent handler
|
|
2649
2643
|
*/
|
|
2650
2644
|
async dispatchEvent(event) {
|
|
2651
|
-
|
|
2652
|
-
const target = event.market || event.wallet || "";
|
|
2653
|
-
this.config.logger.debug(
|
|
2654
|
-
`Dispatching ${event.type} event${target ? ` for ${target}` : ""}`
|
|
2655
|
-
);
|
|
2645
|
+
event.market || event.wallet || "";
|
|
2656
2646
|
try {
|
|
2657
2647
|
if (this.strategy.onEvent) {
|
|
2658
2648
|
await this.strategy.onEvent(event, this.context);
|
|
@@ -2663,8 +2653,6 @@ var OsirisEventRunner = class {
|
|
|
2663
2653
|
error
|
|
2664
2654
|
);
|
|
2665
2655
|
}
|
|
2666
|
-
const eventDuration = Date.now() - eventStart;
|
|
2667
|
-
this.config.logger.debug(`Event handling completed in ${eventDuration}ms`);
|
|
2668
2656
|
}
|
|
2669
2657
|
};
|
|
2670
2658
|
function createEventRunner(strategy, config, context) {
|