Skip to content

Commit

Permalink
setImmediate Not Defined in Browsers Fix (#5450)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacesailor24 authored Sep 16, 2022
1 parent 311d5be commit 53b1b88
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/web3-eth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- I've improved the security in XY (#1000)
-->

## [Unreleased]

### Added

- [setimmediate](https://github.com/yuzujs/setImmediate) package to polyfill [setImmediate](https://nodejs.org/api/timers.html#setimmediatecallback-args) for browsers (#5450)
1 change: 1 addition & 0 deletions packages/web3-eth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"dependencies": {
"@ethereumjs/common": "^2.6.5",
"@ethereumjs/tx": "^3.5.2",
"setimmediate": "^1.0.5",
"web3-core": "^4.0.1-alpha.0",
"web3-errors": "^0.1.1-alpha.0",
"web3-eth-accounts": "^4.0.1-alpha.0",
Expand Down
1 change: 1 addition & 0 deletions packages/web3-eth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ along with web3.js. If not, see <http://www.gnu.org/licenses/>.
/**
*
*/
import 'setimmediate';

import { Web3Eth } from './web3_eth';

Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9378,7 +9378,7 @@ set-value@^2.0.0, set-value@^2.0.1:

setimmediate@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==

setprototypeof@1.2.0:
Expand Down

0 comments on commit 53b1b88

Please sign in to comment.