All private prefixed with _ (#2157)

* All private prefixed with _

* Fix test
This commit is contained in:
Jaco Greeff
2020-04-11 22:21:55 +02:00
committed by GitHub
parent b58d772156
commit a833dccdaf
24 changed files with 254 additions and 257 deletions
+3 -3
View File
@@ -32,12 +32,12 @@ export default class RpcCoder {
assert(isNumber(response.id) || (isSubscription && isNumber(response.params.subscription)), 'Invalid id field in decoded object');
this.checkError(response.error);
this._checkError(response.error);
assert(!isUndefined(response.result) || isSubscription, 'No result found in JsonRpc response');
if (isSubscription) {
this.checkError(response.params.error);
this._checkError(response.params.error);
return response.params.result;
}
@@ -64,7 +64,7 @@ export default class RpcCoder {
return this.#id;
}
private checkError (error?: JsonRpcResponseBaseError): void {
private _checkError (error?: JsonRpcResponseBaseError): void {
if (error) {
const { code, data, message } = error;