-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Improve contract method data fetching #6623
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…se screen route on transactionCategory
… to transaction-list-item.component
… requires simplifying conf-tx-base lifecycle logic.
danjm
force-pushed
the
improve-contract-method-data-fetching
branch
from
May 22, 2019 15:34
91bdef3
to
82d8a0a
Compare
whymarrh
approved these changes
May 28, 2019
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.
LGTM
danjm
added a commit
that referenced
this pull request
Jun 17, 2019
* Remove async call from getTransactionActionKey() * Stop blocking confirm screen rendering on method data loading, and base screen route on transactionCategory * Remove use of withMethodData, fix use of knownMethodData, in relation to transaction-list-item.component * Load data contract method data progressively, making it non-blocking; requires simplifying conf-tx-base lifecycle logic. * Allow editing of gas price while loading on the confirm screen. * Fix transactionAction component and its unit tests. * Fix confirm transaction components for cases of route transitions within metamask. * Only call toString on id if truthy in getNavigateTxData()
danjm
pushed a commit
that referenced
this pull request
Jun 18, 2019
* Adds 4byte registry fallback to getMethodData() (#6435) * Adds fetchWithCache to guard against unnecessary API calls * Add custom fetch wrapper with abort on timeout * Use opts and cacheRefreshTime in fetch-with-cache util * Use custom fetch wrapper with timeout for fetch-with-cache * Improve contract method data fetching (#6623) * Remove async call from getTransactionActionKey() * Stop blocking confirm screen rendering on method data loading, and base screen route on transactionCategory * Remove use of withMethodData, fix use of knownMethodData, in relation to transaction-list-item.component * Load data contract method data progressively, making it non-blocking; requires simplifying conf-tx-base lifecycle logic. * Allow editing of gas price while loading on the confirm screen. * Fix transactionAction component and its unit tests. * Fix confirm transaction components for cases of route transitions within metamask. * Only call toString on id if truthy in getNavigateTxData() * Fix knownMethodData retrieval and data fetching from fourbyte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6529.
Fixes #6530.
Fixes #6591.
This PR significantly refactors how we decide which type of confirm screen to refactor and how we fetch contract method data when rendering a contract method call confirm screen (e.g. "Contract Interaction.") This also changes how contract method data (specifically, the name) is fetched for items in the transaction list.
Goals include:
This PR also includes a fix to the loading of gas data on the send screen: it no longer blocks rendering and users can now edit gas price even while it is loading.
This PR is best reviewed commit by commit
Remove async call from getTransactionActionKey() 2efb441
Stop blocking confirm screen rendering on method data loading, and ba… 4eff4fb
Remove use of withMethodData, fix use of knownMethodData, in relation… e2a7681
Load data contract method data progressively, making it non-blocking;… b2bb2e6
Allow editing of gas price while loading on the confirm screen. 91bdef3