-
Notifications
You must be signed in to change notification settings - Fork 15
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
use non buffer format of fromXDR #32
Conversation
@esteblock , I first noticed this while running the dapp - stellar/soroban-example-dapp#105 (comment) I think this change will resolve the issue, I'm trying to test this locally from dapp to confirm, do you by chance know how to change package.json from a client project such as dapp to point at a local directory for one of the soroban-react workspace packages? I'm trying
but not working at runtime, any insights on how to facilitate that type of local testing? |
I might be missing some context here, but why doesn't the downstream client just... polyfill correctly? |
@sreuland for local testing, this should work: https://stackoverflow.com/a/14387210? |
@Shaptic, @esteblock , this could also be fixed by requiring downstream app poly-fill on |
So this is something I need to work on. Because what I usually would do is:
Following here: https://classic.yarnpkg.com/en/docs/cli/unlink#yarn-unlink-package But doing this I get the following error:
I think is due to the react peer dependency of the library There is a framework to test react libraries, called Jest. I have an open issue to add tests to this library #10 |
@esteblock , yes that is same error with react dependency I'm seeing at browser runtime when trying to reference the workspace packages as local paths from dapp, the node_modules layout looks a bit different between the local path vs. npm repo, just the |
Hello @esteblock , I think we are have agreement on the approach and ready to merge. Do you mind releasing new minor rev's of the packages? Thanks! |
Yes, sure! Also, I will be very happy to add you as collaborators of the repo, what do you think? |
yes, sounds good as changes happening quite often in the stack, thanks! |
Changes:
|
To give you access to the npm registry ( in order for you to publish, I will need your email addresses asociated to your npm account) Reach me on Discord. You will find me as esteblock in the stellar channel |
fixing an issue seen in downstream client usage in browser deployments with error on
Buffer.from()
ofTypeError: this._buffer.readBigInt64BE is not a function
when passing it to soroban clientfromXDR()
methods, if the downstream client app hasn't poly-filled 'Buffer' to a version that has readBigInt64BE() included, then seeing this error raised, it can be avoided by not using Buffer.from() and instead passing xdr encoded string directly to soroban client usingfromXDR(xdr, 'base64')