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

Deposit loading #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lvshaoping007
Copy link
Contributor

  1. change deposit loading to small loading to avoid UI not updating for a long time

Copy link
Contributor

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

more detailed summary of changes from my reading of the code:

  • approve + deposit takes a while, in part because it's multiple transactions
  • this process was previously the same as any other transaction, which puts up a modal spinner
  • this makes it not block out the UI anymore--actually I only understand this from the author's description, and I don't know about the implementation in the code
  • in order to let users still keep track of ongoing allow+deposit, there's a new area in the extension state, called the "local cache" of approve and withdraw transaction hashes that we know we're watching out for. it's backed by localstorage
  • there's new UI (in the paratimes tab?) that keeps an eye on these transactions in the local cache
  • this cache stuff comes after the submitTx, so I think it shouldn't cause any trouble with overlapping transactions and nonce management
  • maybe unrelated, there are some change to the API wrapper, doing something relative and absolute URLs. @lvshaoping007 can you explain that?

the management of this new "local cache" looks pretty reasonable. but additional thoughts:

  • there's something in here about these +-separated strings in the local cache. what does this design get us, compared to having it be a 3-element array?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants