-
Notifications
You must be signed in to change notification settings - Fork 0
Api metadata #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Api metadata #1
Conversation
packages/api/src/Base.ts
Outdated
| ? options.source._rpcBase._provider.clone() | ||
| : options.provider; | ||
|
|
||
| const genesisSpecToMetaDataMap = options.GenesisSpecToMetaDataMap ? options.GenesisSpecToMetaDataMap : {}; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
packages/api/src/Base.ts
Outdated
| } | ||
|
|
||
| private init (): void { | ||
| private init (genesisSpecToMetaDataMap: {[key: string]: string}): void { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for loadMeta()
|
can't find where you update ApiOptions |
packages/api/src/Base.ts
Outdated
| if (this._runtimeVersion) { | ||
| key = `${this._genesisHash}${this._runtimeVersion.specVersion}`; | ||
| } | ||
| if (key in genesisSpecToMetaDataMap) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no for loop used
No description provided.