-
Notifications
You must be signed in to change notification settings - Fork 45
Make axios and bls optional #505
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
Make axios and bls optional #505
Conversation
README.md
Outdated
|
|
||
| ### axios | ||
|
|
||
| This package can make HTTP requests using `axios`, but it is not bundled by default. If you plan to use the API network provider or Proxy network provider, make sure to install `axios`: |
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.
but it is not -> which is not (optional) (here and below).
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.
done
| } | ||
|
|
||
| private async doGet(resourceUrl: string): Promise<any> { | ||
| let axios = await getAxios(); |
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.
Can be const (here and below).
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.
done
src/utils.ts
Outdated
| export async function getAxios() { | ||
| let axios; | ||
| try { | ||
| axios = require("axios"); |
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.
Can return directly, without declaring let axios above.
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.
done
|
|
||
| export class BLS { | ||
| private static isInitialized: boolean = false; | ||
| public static bls: any; |
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.
A bit tricky. C#'s internal would have been nice here :)
Though, since we plan to drop Herumi's library, it's fine 👍
Alternative: private field and a public function getUnderlyingComponent() (or something similar).
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.
I will let it like this since we plan to drop it
No description provided.