Skip to content
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

feat(apiUtils): apiUtil package without test #511

Merged
merged 16 commits into from
Jul 19, 2022
Merged

Conversation

sogunshola
Copy link
Contributor


name: 'Pull request'
about: A new pull request

New Pull Request

Checklist

  • I am not disclosing a vulnerability.
  • My code is conform the code style
  • I have made corresponding changes to the documentation
  • I have updated Typescript definitions when needed

Issue Description

Related issue: #FILL_THIS_OUT

Solution Description

@sogunshola sogunshola requested review from b4rtaz and ErnoW July 18, 2022 17:46
@changeset-bot
Copy link

changeset-bot bot commented Jul 18, 2022

🦋 Changeset detected

Latest commit: 386263e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@moralisweb3/core Major
@moralisweb3/evm-api Major
@moralisweb3/api Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR


export class ApiConfigSetup {
public static register(config: Config) {
config.registerKey(ApiConfig.apiKey);
Copy link
Collaborator

@b4rtaz b4rtaz Jul 18, 2022

Choose a reason for hiding this comment

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

config.registerKey(ApiConfig.apiKey) can be registered in the config only one time. But it's required for evm-api and sol-api modules. So that means, that key cannot be registered in evm-api/sol-api modules double times. Considering this fact that means we need a next module. I suggest to rename apiUtils to api, and add MoralisApi extends ApiModule class to the api package.

@moralisweb3/api <-- module, registers `apiKey` in the config

@moralisweb3/evm-api <-- module, has `@moralisweb3/api` dependency

@moralisweb3/sol-api <-- module, has `@moralisweb3/api` dependency

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perfect!

@sogunshola sogunshola merged commit 8b8cc4c into alpha Jul 19, 2022
@sogunshola sogunshola deleted the feat/apiutils branch July 19, 2022 09:23
@github-actions github-actions bot mentioned this pull request Aug 10, 2022
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.

2 participants