Skip to content
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

[Streaming] Replace fcl.tx implementation with sendAndSubscribe #2017

Open
jribbink opened this issue Nov 15, 2024 · 0 comments
Open

[Streaming] Replace fcl.tx implementation with sendAndSubscribe #2017

jribbink opened this issue Nov 15, 2024 · 0 comments
Assignees

Comments

@jribbink
Copy link
Contributor

jribbink commented Nov 15, 2024

While sendAndSubscribe inherently has a different API than fcl.tx, there are actually some techniques that can be leveraged to subscribe to an already sent transaction.

  1. When a TX is sent by FCL, store a cache of Map<TxID, Tx> (or an alternaive is to just lookup the transaction from AN, but this could be really flakey + extra requests and only serves a narrow case where TX is not sent by FCL)
    • Cache possibly belongs in SDK? (this could accomodate manual SDK sending as well as fcl.mutate)
  2. In fcl.tx use sendAndSubscribe instead, but just pull from the cache to get original TX body
@jribbink jribbink self-assigned this Nov 15, 2024
@jribbink jribbink changed the title [Streaming] Replace fcl.tx with sendAndSubscribe [Streaming] Replace fcl.tx implementation with sendAndSubscribe Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant