Skip to content

Commit

Permalink
Automated lint (snapshot-labs#277)
Browse files Browse the repository at this point in the history
Co-authored-by: ChaituVR <[email protected]>
  • Loading branch information
github-actions[bot] and ChaituVR authored Jan 2, 2022
1 parent 186445c commit 4052f42
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/strategies/multichain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async function getChainBlocksFromApi(
Accept: 'application/json',
'Content-Type': 'application/json'
}
}).then(r => r.json());
}).then((r) => r.json());

//Response should contain blocks object with chainIds as keys and block numbers as values
return resp.blocks;
Expand All @@ -94,7 +94,12 @@ async function getChainBlocks(
if (options.blockApi) {
return await getChainBlocksFromApi(snapshot, provider, options);
} else {
return await getChainBlocksFromSubGraph(snapshot, provider, options, network);
return await getChainBlocksFromSubGraph(
snapshot,
provider,
options,
network
);
}
}

Expand Down
14 changes: 10 additions & 4 deletions src/strategies/sumami-holders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function strategy(
if (options.marinateLevels.length > 4) {
return [];
}

const sUmamiBalances = await erc20BalanceOfStrategy(
space,
network,
Expand All @@ -49,12 +49,18 @@ export async function strategy(
)
)
);

const totalMarinateBalances = marinateBalances.reduce(
//@ts-ignore
(prev, cur) => cur.map((balance, idx) => (prev[idx] || 0) + parseFloat(formatUnits(balance.toString(), options.decimals))), []
(prev, cur) =>
cur.map(
(balance, idx) =>
(prev[idx] || 0) +
parseFloat(formatUnits(balance.toString(), options.decimals))
),
[]
);

return Object.fromEntries(
Object.entries(sUmamiBalances).map((address, index) => [
address[0],
Expand Down

0 comments on commit 4052f42

Please sign in to comment.