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

Implement transaction storage #139

Open
whoabuddy opened this issue Jun 1, 2022 · 0 comments
Open

Implement transaction storage #139

whoabuddy opened this issue Jun 1, 2022 · 0 comments
Labels
Enhancement New feature or request

Comments

@whoabuddy
Copy link

whoabuddy commented Jun 1, 2022

Is your feature request related to a problem? Please describe.

Some data requires looking at a user's transaction history, e.g. which blocks were mined, and while this information is available from the API it doesn't need to be queried multiple times.

All queries are throttled now, so requesting transactions 50 at a time for large accounts could incur a long load time unless some of the data is stored somewhere.

Describe the solution you'd like

Option 1 - use localStorage, some atoms are doing this now, it's simple and straight-forward

Option 2 - use Gaia, some hooks are already provided and are just unused now

Option 3 - use Cloudflare KV, requires defining a namespace but all tx could be stored using the stx address as a key

This would require creating a storage method that can evaluate and store only what's new, ideally reducing the number of requests based on the data already stored.

Describe alternatives you've considered

Querying the data every time is too expensive. Not querying the data makes it difficult to provide good UX.

Additional context

I'm leaning toward Option 2, but since Option 1 is very simple with atoms, it might be easier in the meantime to use it and develop the "fetch and update" structure first.

Option 3 is also interesting because the methods could be reapplied to certain API queries that return immutable contract data.

Curious to hear if anyone has any input!

Note: review against #35 and #39 for overlap.

@whoabuddy whoabuddy added the Enhancement New feature or request label Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant