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

Export Formatter class from @ethersproject/providers #562

Closed
naddison36 opened this issue Jul 19, 2019 · 3 comments
Closed

Export Formatter class from @ethersproject/providers #562

naddison36 opened this issue Jul 19, 2019 · 3 comments
Assignees
Labels
enhancement New feature or improvement.

Comments

@naddison36
Copy link

Can the Formatter class be exported from the @ethersproject/providers package in version 5?

I need to override a few functions in the Formatter class in order to implement the EEA client extension. As the Formatter class is not exported, I've got to copy 427 lines of the class to my extension project. This makes ongoing maintenance harder.

The Formatter class also uses the FormatFunc, FormatFuncs and Formats functions so it'd be good if these can also be exported.

Thanks
Nick

@ricmoo
Copy link
Member

ricmoo commented Jul 19, 2019

Ah yes! It absolutely should be. I want to move away from package relative imports in all of ethers, since it breaks so many bundling tools. I’ll write a quick regex later to find them all and export them. :)

@ricmoo ricmoo added enhancement New feature or improvement. next version labels Jul 20, 2019
@ricmoo ricmoo self-assigned this Jul 20, 2019
ricmoo added a commit that referenced this issue Jul 20, 2019
@ricmoo
Copy link
Member

ricmoo commented Jul 20, 2019

This should be exposed in 5.0.0-beta.145.

Let me know if you have any issues. :)

Thanks! :)

@ricmoo ricmoo closed this as completed Jul 20, 2019
@naddison36
Copy link
Author

Thanks @ricmoo

For anyone interested, you can see how I extended the Formatter class here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement.
Projects
None yet
Development

No branches or pull requests

2 participants