patch trades and move last update

This commit is contained in:
Nour Alharithi
2023-11-20 13:54:46 -08:00
parent 613f4ccf63
commit 6ce59a1394
3 changed files with 9 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ import {
QUOTE_PRECISION,
PRICE_PRECISION,
getVariant,
ZERO,
} from '@drift-labs/sdk';
import { logger, setLogLevel } from '../utils/logger';
@@ -181,7 +182,10 @@ const main = async () => {
slot: fill.slot,
action: 'fill',
actionExplanation: getVariant(fill.actionExplanation),
referrerReward: convertToNumber(fill.referrerReward, QUOTE_PRECISION),
referrerReward: convertToNumber(
fill.referrerReward ?? ZERO,
QUOTE_PRECISION
),
};
})
)