@@ -172,14 +172,12 @@ const waitForTransactionConfirm = (web3, txHash) => {
172 }, RETRY_OPTIONS);
172 }, RETRY_OPTIONS);
175+// returns a Promise that resolves when all stxs have been sent & confirmed
175−const sendAndAwaitAll = async (web3, stxs, doubtNonceError) => {
176+const sendAndAwaitAll = (web3, stxs, doubtNonceError) => {
176− await Promise.all(
177+ return Promise.all(
177− stxs.map(tx => {
178+ stxs.map(async tx => {
178− return new Promise(async (resolve, reject) => {
179− const txHash = await sendSignedTransaction(web3, tx, doubtNonceError);
179+ const txHash = await sendSignedTransaction(web3, tx, doubtNonceError);
180− await waitForTransactionConfirm(web3, txHash);
180+ await waitForTransactionConfirm(web3, txHash);