diff --git a/package.json b/package.json index 0b0b015..8f3b676 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ }, "dependencies": { "@babel/runtime-corejs3": "^7.17.2", + "abort-controller": "^3.0.0", "bs58": "^4.0.1", "clone": "^2.1.2", "core-js": "^3.21.0", diff --git a/src/baseRequest.js b/src/baseRequest.js index a2f9c86..959e339 100644 --- a/src/baseRequest.js +++ b/src/baseRequest.js @@ -2,6 +2,8 @@ // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 +// TODO: remove abort-controller when using Node >=15 +import AbortController from 'abort-controller' import { Promise } from 'es6-promise' import fetchPonyfill from 'fetch-ponyfill' import { vsprintf } from 'sprintf-js'