Replies: 1 comment 6 replies
-
Interesting consequence of a check ethers performs, which is to ensure new is used for every object. This is to prevent people from attempting to use a class as a function. It looks like your code is being transpired into a very old format of JavaScript which is replacing the super call with a normal |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, hope you're doing well. I'm building a general purpose wallet that inherits from Ethers, but I am receiving the following strange error when I run the compiled package (local jest tests work fine):
Wallet cannot be invoked without 'new'
which points towards this line in the call to super():
__this = Wallet.call(this, privateKey, provider) || this;
Do you have any idea what may be causing this issue? I have attached the constructor for my wallet class below:
Beta Was this translation helpful? Give feedback.
All reactions