Skip to content
This repository has been archived by the owner on Apr 11, 2021. It is now read-only.

Fix error in getReceiptWithResubmission #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@types/mocha": "^5.2.6",
"@types/node": "^11.11.3",
"@types/sinon-chai": "^3.2.4",
"@types/bluebird": "^3.5.20",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"ethereum-waffle": "3.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/batch-submitter/batch-submitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export abstract class BatchSubmitter {
const promises = [...receiptPromises, sleepAndReturnResubmit(
resubmissionTimeout
)]
const val = await bPromise.any(promises)
const val = await bPromise.any(Promise.resolve(promises))

if (val === 'resubmit') {
log.debug(`Tx resubmission timeout reached for hash: ${response.hash}; nonce: ${response.nonce}.
Expand All @@ -181,7 +181,7 @@ export abstract class BatchSubmitter {
log
)
} else {
return val
return val as TransactionReceipt
}
}

Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,11 @@
dependencies:
defer-to-connect "^1.0.1"

"@types/bluebird@^3.5.20":
version "3.5.33"
resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.33.tgz#d79c020f283bd50bd76101d7d300313c107325fc"
integrity sha512-ndEo1xvnYeHxm7I/5sF6tBvnsA4Tdi3zj1keRKRs12SP+2ye2A27NDJ1B6PqkfMbGAcT+mqQVqbZRIrhfOp5PQ==

"@types/bn.js@*", "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5":
version "4.11.6"
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c"
Expand Down