Skip to content

Commit

Permalink
fix getBlocks error
Browse files Browse the repository at this point in the history
  • Loading branch information
0xngmi committed Apr 18, 2024
1 parent 836f750 commit b8b7f3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/peggedAssets/storePeggedAssets/getAndStorePeggedAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type EmptyObject = { [key: string]: undefined };

async function getPeggedAsset(
unixTimestamp: number,
ethBlock: number,
ethBlock: number | undefined,
chainBlocks: ChainBlocks | undefined,
peggedAsset: PeggedAsset,
peggedBalances: PeggedAssetIssuance,
Expand Down Expand Up @@ -243,7 +243,7 @@ const timeout = (prom: any, time: number, peggedID: string, chain: string) =>

export async function storePeggedAsset(
unixTimestamp: number,
ethBlock: number,
ethBlock: number|undefined,
chainBlocks: ChainBlocks | undefined,
peggedAsset: PeggedAsset,
module: any,
Expand Down
7 changes: 2 additions & 5 deletions src/peggedAssets/storePeggedAssets/storePegged.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ const timeout = (prom: any, time: number, peggedID: string) =>
);

async function iteratePeggedAssets(peggedIndexes: number[]) {
const { timestamp, ethereumBlock } = await timeout(
getCurrentBlocks(),
45000,
"getBlocks"
);
const timestamp = getCurrentUnixTimestamp()
const ethereumBlock = undefined
if (timestamp) {
const actions = peggedIndexes
.map((idx) => peggedAssets[idx])
Expand Down

0 comments on commit b8b7f3e

Please sign in to comment.