mirror of
https://github.com/dap-ps/discover.git
synced 2025-02-24 15:08:13 +00:00
don't use map, just simple loop
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
60f14bb2f3
commit
ccae507c00
@ -60,9 +60,12 @@ class DiscoverService extends BlockchainService {
|
|||||||
JSON.stringify(await MetadataClient.retrieveMetadataCache()),
|
JSON.stringify(await MetadataClient.retrieveMetadataCache()),
|
||||||
)
|
)
|
||||||
|
|
||||||
let asyncCalls = [...Array(contractDappsCount).keys()].map(
|
let asyncCalls = [ ]
|
||||||
i => DiscoverContract.methods.dapps(i).call({ from: this.sharedContext.account })
|
for (let i = 0; i < contractDappsCount; i++) {
|
||||||
)
|
asyncCalls.push(
|
||||||
|
DiscoverContract.methods.dapps(i).call({from: this.sharedContext.account})
|
||||||
|
)
|
||||||
|
}
|
||||||
/* using Promise.all() to run calls in parallel */
|
/* using Promise.all() to run calls in parallel */
|
||||||
let dapps = await Promise.all(asyncCalls)
|
let dapps = await Promise.all(asyncCalls)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user