mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Show retry button on submitted transactions greater than 30 seconds, add hover styling
This commit is contained in:
parent
b26c975294
commit
b9f2f8c2a7
@ -28,6 +28,12 @@ function TransactionListItem () {
|
||||
Component.call(this)
|
||||
}
|
||||
|
||||
TransactionListItem.prototype.showRetryButton = function () {
|
||||
const { transaction = {} } = this.props
|
||||
const { status, time } = transaction
|
||||
return status === 'submitted' && Date.now() - time > 30000
|
||||
}
|
||||
|
||||
TransactionListItem.prototype.render = function () {
|
||||
const { transaction, network, conversionRate, currentCurrency } = this.props
|
||||
const { status } = transaction
|
||||
@ -114,7 +120,7 @@ TransactionListItem.prototype.render = function () {
|
||||
}) : h('.flex-column'),
|
||||
]),
|
||||
|
||||
transaction.status === 'submitted' && h('.transition-list-item__retry', {
|
||||
this.showRetryButton() && h('.transition-list-item__retry.grow-on-hover', {
|
||||
onClick: event => {
|
||||
event.stopPropagation()
|
||||
this.resubmit()
|
||||
|
@ -108,6 +108,10 @@ button:not([disabled]):active, input[type="submit"]:not([disabled]):active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.grow-on-hover:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
|
Loading…
Reference in New Issue
Block a user