fix drift client

This commit is contained in:
Nour Alharithi
2023-11-11 09:37:33 -08:00
parent d18952572a
commit 76d9791ae8

View File

@@ -169,7 +169,8 @@ const main = async () => {
connection, connection,
stateCommitment, stateCommitment,
ORDERBOOK_UPDATE_INTERVAL ORDERBOOK_UPDATE_INTERVAL
), );
driftClient = new DriftClient({ driftClient = new DriftClient({
connection, connection,
wallet, wallet,
@@ -213,7 +214,11 @@ const main = async () => {
await userMap.subscribe(); await userMap.subscribe();
const userStatsMap = new UserStatsMap(driftClient, { const userStatsMap = new UserStatsMap(driftClient, {
type: 'polling', type: 'polling',
accountLoader: bulkAccountLoader, accountLoader: new BulkAccountLoader(
connection,
stateCommitment,
ORDERBOOK_UPDATE_INTERVAL * 10
),
}); });
await userStatsMap.subscribe(); await userStatsMap.subscribe();