mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-04-29 15:37:50 +00:00
remove unused function RequestManager.cancel() (#1760)
RequestManager.cancel() is an unused function that has no use case. It should be deleted to bring up code coverage.
This commit is contained in:
@@ -24,21 +24,6 @@ export default class RequestManager {
|
||||
}
|
||||
>()
|
||||
|
||||
/**
|
||||
* Cancels a request.
|
||||
*
|
||||
* @param id - ID of the request.
|
||||
* @throws Error if no existing promise with the given ID.
|
||||
*/
|
||||
public cancel(id: string | number): void {
|
||||
const promise = this.promisesAwaitingResponse.get(id)
|
||||
if (promise == null) {
|
||||
throw new XrplError(`No existing promise with id ${id}`)
|
||||
}
|
||||
clearTimeout(promise.timer)
|
||||
this.deletePromise(id)
|
||||
}
|
||||
|
||||
/**
|
||||
* Successfully resolves a request.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user