Closed jopmiddelkamp closed 1 year ago
Hi @jopmiddelkamp thank you for reporting this issue. I will check it next week.
Hi @jopmiddelkamp, currently I don't have issues with the streaming. I added an example (test case) for you in this commit: https://github.com/Soneso/stellar_flutter_sdk/commit/aaef528d8d11c5910aaa4d126f3984d791648a68
You can find it here: https://github.com/Soneso/stellar_flutter_sdk/blob/aaef528d8d11c5910aaa4d126f3984d791648a68/test/account_test.dart#L280
Another example that already existed is here: https://github.com/Soneso/stellar_flutter_sdk/blob/aaef528d8d11c5910aaa4d126f3984d791648a68/test/payments_test.dart#L1027
Hope this helps
Hmm your unit test works so the EventSource seem to be working. I'll change my issue title.
Compared your transactions stream to my account stream and I can't find any difference other then you stream is working and the one I tried to add isn't.. Can you spot anything that I've done wrong maybe?
Hello,
I am not sure what you want to achieve. But I assume you want streaming for the account details. However, this Horizon endpoint does not offer streaming. Instead, I would use transactions streaming for the given account and as soon as a transaction event is received, I would reload the account details (only transactions can change accounts).
See (streaming mentioned): https://developers.stellar.org/api/resources/get-transactions-by-account-id
See (no streaming mentioned): https://developers.stellar.org/api/resources/retrieve-an-account
Ahh ok, I thought that steaming should be available because I saw it in the laboratory combined with the fact that I got a stream going with the JavaScript SDK.
But I'll just create another solution with the transaction stream.
Thanks Christian.
yw, thanks for bringing this up
Hi,
I'm trying to add the single account stream only the EventSource class does not seem te work. You can see that I've added some unit test in the draft PR.
https://github.com/Soneso/stellar_flutter_sdk/pull/60/files
When I run this script while doing the unit test I do see the javascript stream to output the expected data. Only the stream in the unit test only shows the first account reponse event.
Is this a known issue?