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
@@ -34,7 +34,7 @@ type MetaAsX = 'asV0' | 'asV1' | 'asV2' | 'asV3' | 'asV4' | 'asV5' | 'asV6' | 'a
* The versioned runtime metadata as a decoded structure
*/
export default class MetadataVersioned extends Struct {
private _converted: Map<number, MetaMapped> = new Map();
readonly #converted: Map<number, MetaMapped> = new Map();
constructor (registry: Registry, value?: any) {
super(registry, {
@@ -59,11 +59,11 @@ export default class MetadataVersioned extends Struct {
return this.metadata[asCurr] as T;
}
if (!this._converted.has(version)) {
this._converted.set(version, fromPrev(this.registry, this[asPrev] as F));
if (!this.#converted.has(version)) {
this.#converted.set(version, fromPrev(this.registry, this[asPrev] as F));
}
return this._converted.get(version) as T;
return this.#converted.get(version) as T;
}
/**