-
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
Add Estimated time to pending tx #6924
Conversation
@Krist14n Don't worry about the failing |
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.
I think this is close. I left some comments regarding where exactly we should make the fetchBasicGasAndTimeEstimates
and how we might improve performance a bit. Also see my note regarding failing tests (which I will do something about).
ui/app/components/app/transaction-time-remaining/transaction-time-remaining.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-time-remaining/transaction-time-remaining.container.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-time-remaining/transaction-time-remaining.container.js
Outdated
Show resolved
Hide resolved
Code looks good. Now just need to get the tests passing. |
8100288
to
8c11cf0
Compare
b502511
to
67fa5ad
Compare
9ed4c9c
to
4ca924d
Compare
ui/app/components/app/transaction-list-item/transaction-list-item.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list-item/transaction-list-item.container.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.container.js
Outdated
Show resolved
Hide resolved
heads up @tmashuang we should put this through a lot of QA -- if these estimates are frequently way off, we will need to tweak or shelve the feature. also, probably want to show |
ff1959a
to
b18f5ad
Compare
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.
There appears to be an empty file added: ui/app/components/app/transaction-time-remaining/index.scss
ui/app/components/app/transaction-list-item/transaction-list-item.container.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.container.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-time-remaining/transaction-time-remaining.component.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-list/transaction-list.component.js
Outdated
Show resolved
Hide resolved
@Gudahtt I addressed your comments in 74b1204df |
0bfda44
to
d788005
Compare
…here are pending-txs
…tor in selectors.js
2a3e85d
to
1a4d021
Compare
1a4d021
to
b578d80
Compare
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.
Looks good!
@@ -0,0 +1,85 @@ | |||
import BigNumber from 'bignumber.js' | |||
window.BigNumber = BigNumber |
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.
Is this necessary?
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.
Done in ff192618d
const formattedSec = `${seconds ? seconds + ' sec' : ''}` | ||
const formattedCombined = formattedMin && formattedSec | ||
? `${symbol}${formattedMin} ${formattedSec}` | ||
: symbol + [formattedMin, formattedSec].find(t => t) |
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.
[formattedMin, formattedSec].find(t => t)
seems a bit weird—is there a better way we could express this?
Maybe formattedMin || formattedSec
? Is that the same thing?
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.
Done in ff192618d
…tdown seconds and show '< 30'
I have updated this PR to remove unneeded and misleading code, and improved the UX by actually having the time remaining estimate count down seconds. Additionally, the countdown results in a '< 30 s' time estimate once the estimate goes below 30 seconds. Here are some videos demoing the UX: https://streamable.com/s517x, https://streamable.com/ljgg4 |
ui/app/components/app/transaction-time-remaining/transaction-time-remaining.container.js
Outdated
Show resolved
Hide resolved
ui/app/components/app/transaction-time-remaining/transaction-time-remaining.util.js
Outdated
Show resolved
Hide resolved
ff19261
to
625412c
Compare
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.
* Add estimated time to pending transactions * add sytles for pending transactions component * add media queries styling for pending transactions component * fix lint errors, remove extra spaces * refactor code to call `fetchBasicGasAndTimeEstimates` method once * refactor code to call `getgetRenderableTimeEstimate` method once * fix, correct export to use `transaction-time-remaining-component` * fix indentation issues after running `yarn lint` * newBigSigDig in gas-price-chart.utils supports strings * Code cleanup * Ensure fetchBasicGasAndTimeEstimates is only called from tx-list if there are pending-txs * Move gas time estimate utilities into utility file * Move getTxParams to transaction selector file * Add feature flag for display of remaining transaction time in tx history list * Fix circular dependency by removing unused import of transactionSelector in selectors.js * Use correct feature flag property name transactionTime * Ensure that tx list component correctly responds to turning tx time feature on * Prevent precision errors in newBigSigDig * Code clean up for pending transaction times * Update transaction-time-remaining feature to count down seconds, countdown seconds and show '< 30' * Code clean up for transaction-time-remaining feature
This fix includes the estimated time remaining for pending transactions #6850