From fde1eeb3a72afe792bd0078228d70d01738861ad Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 18 Mar 2020 12:04:10 -0400 Subject: [PATCH] fix(@embark/blockchain): fix blockchain plugins' use of async whilst --- packages/plugins/geth/src/blockchain.js | 4 ++-- packages/plugins/parity/src/blockchain.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/plugins/geth/src/blockchain.js b/packages/plugins/geth/src/blockchain.js index 521f075eb..e02241163 100644 --- a/packages/plugins/geth/src/blockchain.js +++ b/packages/plugins/geth/src/blockchain.js @@ -337,8 +337,8 @@ class Blockchain { if (!newAccountCommand) return next(); var accountNumber = 0; async.whilst( - function () { - return accountNumber < accountsToCreate; + function (cb) { + cb(null, accountNumber < accountsToCreate); }, function (callback) { accountNumber++; diff --git a/packages/plugins/parity/src/blockchain.js b/packages/plugins/parity/src/blockchain.js index 0ef968a31..3c9e5fa69 100644 --- a/packages/plugins/parity/src/blockchain.js +++ b/packages/plugins/parity/src/blockchain.js @@ -346,8 +346,8 @@ class Blockchain { function newAccounts(accountsToCreate, next) { var accountNumber = 0; async.whilst( - function () { - return accountNumber < accountsToCreate; + function (cb) { + cb(null, accountNumber < accountsToCreate); }, function (callback) { accountNumber++;