Skip to content

Commit

Permalink
Merge pull request #169 from marvin6en/main
Browse files Browse the repository at this point in the history
myx : dex : fix
  • Loading branch information
0xroll authored May 24, 2024
2 parents b7cae9f + c41032c commit 338d266
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions adapters/myx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import fs from 'fs';
import {write} from 'fast-csv';

import {BlockData, OutputSchemaRow} from './sdk/types';
import {getUserPositionsAtBlock} from './sdk/lib';
import {getTimestampAtBlock, getUserPositionsAtBlock} from './sdk/lib';

const pipeline = promisify(stream.pipeline);

Expand Down Expand Up @@ -96,11 +96,13 @@ export const getUserTVLByBlock = async ({blockNumber, blockTimestamp}: BlockData
}
}

const timestamp = await getTimestampAtBlock(blockNumber);

for (const [user, tokenBalances] of balances) {
for (const [token, tokenBalance] of tokenBalances) {
result.push({
block_number: blockNumber,
timestamp: blockTimestamp,
timestamp: timestamp,
user_address: user,
token_address: token,
token_balance: tokenBalance.balance,
Expand Down

0 comments on commit 338d266

Please sign in to comment.