stricter types in tradesPublisher
This commit is contained in:
@@ -19,6 +19,8 @@ import {
|
|||||||
getVariant,
|
getVariant,
|
||||||
ZERO,
|
ZERO,
|
||||||
BN,
|
BN,
|
||||||
|
OrderActionRecord,
|
||||||
|
Event,
|
||||||
} from '@drift-labs/sdk';
|
} from '@drift-labs/sdk';
|
||||||
|
|
||||||
import { logger, setLogLevel } from '../utils/logger';
|
import { logger, setLogLevel } from '../utils/logger';
|
||||||
@@ -130,7 +132,7 @@ const main = async () => {
|
|||||||
event.eventType === 'OrderActionRecord' &&
|
event.eventType === 'OrderActionRecord' &&
|
||||||
JSON.stringify(event.action) === JSON.stringify(OrderAction.FILL)
|
JSON.stringify(event.action) === JSON.stringify(OrderAction.FILL)
|
||||||
),
|
),
|
||||||
map((fill) => {
|
map((fill: Event<OrderActionRecord>) => {
|
||||||
return {
|
return {
|
||||||
ts: fill.ts.toNumber(),
|
ts: fill.ts.toNumber(),
|
||||||
marketIndex: fill.marketIndex,
|
marketIndex: fill.marketIndex,
|
||||||
|
|||||||
Reference in New Issue
Block a user