-
Notifications
You must be signed in to change notification settings - Fork 897
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
contract events for ui updates to pledge display #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, code looks good. There's a dependency issue in the build, seems like, and it would be good to get the 0.5.1 version of the soroban-client dependency
after updating to all preview9 versions available, it seems close, am trying to run locally, seeing a problem with
the |
@sreuland you can use the SDK, e.g. |
or for something more raw, you can use |
oh, I think this thread is relevant: https://discord.com/channels/897514728459468821/1111673776317399103/1111673776317399103 |
@Shaptic , thanks for insight on the StrKey usage, I added a workaround based on that. |
I'm debugging an issue here with latest versions, getting
this works in node but from browser(using dist) get the error. seems like something is not getting included up the dependency tree by webpack, as it's gen'd xdr code packaged from dts-xdr->xdr-gen->stellar-base->soroban-client. any insights on this appreciated. |
runtime looks stable, need to test pledges to confirm that area works before merging, will do that once freighter 5.0.2 comes out as pledges go through that as payments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed two minor bugs, and a couple side-comments. But LGTM.
Dockerfile still has Does this need to be updated |
@Julian-dev28 , I believe that ref for cli has been updated in pr change set - https://github.com/stellar/soroban-example-dapp/pull/105/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R15 |
Added contract events to the dapp examples. Demonstrating how to wire up events from a contract to the dapp, and some aspects of async, event driven application state changes.
Most of the aspects of subscribing to get events has been implemented as a reusable react provider in soroban-react/pr-26 and used here in the pledge components.
The pr changes the Pledged Amount at top of screen to be event driven, rest of app display state remains user request based. A short video demo's the effect, it shows two browser panels, both have dapp loaded and using the same rpc server and freighter wallet. Left side browser has no user interaction, but its Pledged Amount state will change as it receives contract events from the rpc server, while on the right side browser, the user initiates pledges(contract invocations).
Untitled.2.mp4
Closes soroban-tools:458
Closes #107
This is based on Soroban Preview 9