Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Commit

Permalink
safety
Browse files Browse the repository at this point in the history
  • Loading branch information
machard committed May 6, 2021
1 parent aeba097 commit 1b02a4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions script/crypto-assets-importer/importers/ethereum-dapps.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ module.exports = {
readFileJSON(path.join(folder, id, "b2c.json")),
]);

const addresses = Object.keys(signatures);

const abisList = await Promise.all(
Object.keys(signatures).map((address) =>
addresses.map((address) =>
readFileJSON(
path.join(folder, id, "abis", `${address}.abi.json`)
).catch(() => {})
)
);

const abis = Object.keys(signatures).reduce(
const abis = addresses.reduce(
(acc, address, i) => ({
...acc,
[address]: abisList[i],
Expand Down

0 comments on commit 1b02a4e

Please sign in to comment.