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:
Omar Khan
2021-10-19 18:08:05 -04:00
committed by GitHub
parent 73bc7152ca
commit 217b94e2fa

View File

@@ -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.
*