@defisaver/automation-sdk 1.0.8 → 1.0.9
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.
|
@@ -61,7 +61,7 @@ export default class StrategiesAutomation extends Automation {
|
|
|
61
61
|
var _a;
|
|
62
62
|
let latestUpdate = subscriptionEvents[index];
|
|
63
63
|
if (latestUpdate.subHash !== (sub === null || sub === void 0 ? void 0 : sub.strategySubHash)) {
|
|
64
|
-
const updates = yield this.getUpdateDataEventsFromSubStorage(Object.assign(Object.assign({}, addToObjectIf(!!_options, _options)), { filter: latestUpdate.subId }));
|
|
64
|
+
const updates = yield this.getUpdateDataEventsFromSubStorage(Object.assign(Object.assign({}, addToObjectIf(!!_options, _options)), { filter: { subId: latestUpdate.subId } }));
|
|
65
65
|
latestUpdate = Object.assign(Object.assign({}, latestUpdate), (_a = updates === null || updates === void 0 ? void 0 : updates[updates.length - 1]) === null || _a === void 0 ? void 0 : _a.returnValues);
|
|
66
66
|
}
|
|
67
67
|
return this.getParsedSubscriptions({
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type Web3 from 'web3';
|
|
2
|
-
import type { PastEventOptions
|
|
2
|
+
import type { PastEventOptions } from 'web3-eth-contract';
|
|
3
3
|
import type {
|
|
4
4
|
Position, Interfaces, EthereumAddress,
|
|
5
5
|
SubscriptionOptions, Contract, ParseData, PlaceholderType,
|
|
@@ -84,7 +84,10 @@ export default class StrategiesAutomation extends Automation {
|
|
|
84
84
|
let latestUpdate = subscriptionEvents[index];
|
|
85
85
|
|
|
86
86
|
if (latestUpdate.subHash !== sub?.strategySubHash) {
|
|
87
|
-
const updates = await this.getUpdateDataEventsFromSubStorage({
|
|
87
|
+
const updates = await this.getUpdateDataEventsFromSubStorage({
|
|
88
|
+
...addToObjectIf(!!_options, _options),
|
|
89
|
+
filter: { subId: latestUpdate.subId },
|
|
90
|
+
});
|
|
88
91
|
latestUpdate = {
|
|
89
92
|
...latestUpdate, // Update is missing proxy, hence this
|
|
90
93
|
...updates?.[updates.length - 1]?.returnValues,
|
package/umd/index.js
CHANGED
|
@@ -1222,7 +1222,9 @@ class StrategiesAutomation extends _Automation__WEBPACK_IMPORTED_MODULE_3__["def
|
|
|
1222
1222
|
if (latestUpdate.subHash !== (sub === null || sub === void 0 ? void 0 : sub.strategySubHash)) {
|
|
1223
1223
|
var _updates;
|
|
1224
1224
|
var updates = yield _this5.getUpdateDataEventsFromSubStorage(_objectSpread(_objectSpread({}, (0,_services_utils__WEBPACK_IMPORTED_MODULE_0__.addToObjectIf)(!!_options, _options)), {}, {
|
|
1225
|
-
filter:
|
|
1225
|
+
filter: {
|
|
1226
|
+
subId: latestUpdate.subId
|
|
1227
|
+
}
|
|
1226
1228
|
}));
|
|
1227
1229
|
latestUpdate = _objectSpread(_objectSpread({}, latestUpdate), updates === null || updates === void 0 ? void 0 : (_updates = updates[updates.length - 1]) === null || _updates === void 0 ? void 0 : _updates.returnValues);
|
|
1228
1230
|
}
|