kadena-io / pact-lang-api

BSD 3-Clause "New" or "Revised" License
20 stars 16 forks source link

Fix package fails when Buffer is not provided globally #38

Closed JCM00N closed 2 years ago

JCM00N commented 2 years ago

Currently the package relies on the Buffer object to be present, which isn't always the case. While browserify is listed as a dependency that can provide Buffer, it is not used here. Explicitly importing the package fixes this.

JCM00N commented 2 years ago

EDIT: After checking online more, it seems perhaps another solution should be up to the consumer of the package to provide the polyfill. If that's the case I'll close the PR