prettify
This commit is contained in:
@@ -47,7 +47,7 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
|
|||||||
includeVamm: true,
|
includeVamm: true,
|
||||||
numVammOrders: 100,
|
numVammOrders: 100,
|
||||||
updateOnChange: true,
|
updateOnChange: true,
|
||||||
fallbackL2Generators: []
|
fallbackL2Generators: [],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const market of MainnetSpotMarkets) {
|
for (const market of MainnetSpotMarkets) {
|
||||||
@@ -58,7 +58,7 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
|
|||||||
depth: 2,
|
depth: 2,
|
||||||
includeVamm: false,
|
includeVamm: false,
|
||||||
updateOnChange: true,
|
updateOnChange: true,
|
||||||
fallbackL2Generators: []
|
fallbackL2Generators: [],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -82,10 +82,17 @@ export class DLOBSubscriberIO extends DLOBSubscriber {
|
|||||||
l2Formatted = l2WithBNToStrings(l2);
|
l2Formatted = l2WithBNToStrings(l2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (l2Args.updateOnChange && this.lastSeenL2Formatted.get(l2Args.marketType)?.get(l2Args.marketIndex) === JSON.stringify(l2Formatted)) {
|
if (
|
||||||
|
l2Args.updateOnChange &&
|
||||||
|
this.lastSeenL2Formatted
|
||||||
|
.get(l2Args.marketType)
|
||||||
|
?.get(l2Args.marketIndex) === JSON.stringify(l2Formatted)
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lastSeenL2Formatted.get(l2Args.marketType)?.set(l2Args.marketIndex, JSON.stringify(l2Formatted));
|
this.lastSeenL2Formatted
|
||||||
|
.get(l2Args.marketType)
|
||||||
|
?.set(l2Args.marketIndex, JSON.stringify(l2Formatted));
|
||||||
l2Formatted['marketName'] = l2Args.marketName;
|
l2Formatted['marketName'] = l2Args.marketName;
|
||||||
l2Formatted['marketType'] = l2Args.marketType;
|
l2Formatted['marketType'] = l2Args.marketType;
|
||||||
l2Formatted['marketIndex'] = l2Args.marketIndex;
|
l2Formatted['marketIndex'] = l2Args.marketIndex;
|
||||||
|
|||||||
Reference in New Issue
Block a user