near-api-js
near-api-js copied to clipboard
process not defined in all environments
Describe the bug I use NAJ in cloudflare workers and there is not process and of course no process.env so the following code throws errors:
I think this was introduced with the events that were recently added?
To Reproduce Steps to reproduce the behavior: 1. Run signAndSendTransaction in any environment without process.env
Expected behavior It works
Additional context I recommend checking ALSO if process is defined first, then checking process.env so that envs without process defined can still use these methods.
Hey @mattlockyer, thanks for reporting! Can I get some more info about how you setup near-api-js on a cloudflare worker? We'd like to repro this to decide how to proceed 🙂
Hey @mattlockyer, a kind reminder for the comment above. Thank you.