Adjust class privates via #, where applicable (#1921)

* Adjust class priates via #, where applicable

* Remove stray log

* Cleanup rpc-provider

* Small adjustments

* No private access in tests

* Submittable privates

* Use derive for nonce derivation

* Tweak observers

* Alphabetical privates
This commit is contained in:
Jaco Greeff
2020-02-22 11:29:50 +01:00
committed by GitHub
parent ccf32a6289
commit 3bf4c3fac5
32 changed files with 406 additions and 514 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import { assert, isUndefined, isNumber, isString } from '@polkadot/util';
/** @internal */
export default class RpcCoder {
private id = 0;
#id = 0;
public decodeResponse (response: JsonRpcResponse): any {
assert(response, 'Empty response object received');
@@ -39,7 +39,7 @@ export default class RpcCoder {
public encodeObject (method: string, params: any | any[]): JsonRpcRequest {
return {
id: ++this.id,
id: ++this.#id,
jsonrpc: '2.0',
method,
params
@@ -47,7 +47,7 @@ export default class RpcCoder {
}
public getId (): number {
return this.id;
return this.#id;
}
private checkError (error?: JsonRpcResponseBaseError): void {