Skip to content

Conversation

@KarishmaBothara
Copy link
Owner

No description provided.

? options.source._rpcBase._provider.clone()
: options.provider;

const genesisSpecToMetaDataMap = options.GenesisSpecToMetaDataMap ? options.GenesisSpecToMetaDataMap : {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use deconstructing to assign a default value.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GenesisSpecToMetaDataMap first G should be lowercase

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a better name, something like prebundles

}

private init (): void {
private init (genesisSpecToMetaDataMap: {[key: string]: string}): void {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to change signature of init(), you can use this.options to get visit the value

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for loadMeta()

@ianhe8x
Copy link
Collaborator

ianhe8x commented Apr 17, 2019

can't find where you update ApiOptions

if (this._runtimeVersion) {
key = `${this._genesisHash}${this._runtimeVersion.specVersion}`;
}
if (key in genesisSpecToMetaDataMap) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use a for loop? i think you have a key already, so either it exists or not

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no for loop used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants