aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-15 11:19:13 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-15 11:29:15 +0800
commitb062fe2e9940720ba13c4884a10abf3eab7f25b8 (patch)
tree5227a81e3fdb210b348290eaa538ddc307d1a922 /ui/app/components
parent2ec09362c59958a457939724003312024f97393c (diff)
downloadtangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.tar
tangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.tar.gz
tangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.tar.bz2
tangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.tar.lz
tangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.tar.xz
tangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.tar.zst
tangerine-wallet-browser-b062fe2e9940720ba13c4884a10abf3eab7f25b8.zip
Fix speed up functionality
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js12
-rw-r--r--ui/app/components/transaction-list-item/transaction-list-item.component.js5
2 files changed, 12 insertions, 5 deletions
diff --git a/ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js b/ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js
index d57ff130a..f65ff4d55 100644
--- a/ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js
+++ b/ui/app/components/transaction-list-item-details/transaction-list-item-details.component.js
@@ -13,8 +13,9 @@ export default class TransactionListItemDetails extends PureComponent {
}
static propTypes = {
- transaction: PropTypes.object,
+ onRetry: PropTypes.func,
showRetry: PropTypes.bool,
+ transaction: PropTypes.object,
}
handleEtherscanClick = () => {
@@ -26,6 +27,13 @@ export default class TransactionListItemDetails extends PureComponent {
this.setState({ showTransactionDetails: true })
}
+ handleRetry = event => {
+ const { onRetry } = this.props
+
+ event.stopPropagation()
+ onRetry()
+ }
+
render () {
const { t } = this.context
const { transaction, showRetry } = this.props
@@ -40,7 +48,7 @@ export default class TransactionListItemDetails extends PureComponent {
showRetry && (
<Button
type="raised"
- onClick={this.handleEtherscanClick}
+ onClick={this.handleRetry}
className="transaction-list-item-details__header-button"
>
{ t('speedUp') }
diff --git a/ui/app/components/transaction-list-item/transaction-list-item.component.js b/ui/app/components/transaction-list-item/transaction-list-item.component.js
index 5564f0883..e590e96e0 100644
--- a/ui/app/components/transaction-list-item/transaction-list-item.component.js
+++ b/ui/app/components/transaction-list-item/transaction-list-item.component.js
@@ -42,9 +42,7 @@ export default class TransactionListItem extends PureComponent {
this.setState({ showTransactionDetails: !showTransactionDetails })
}
- handleRetryClick = event => {
- event.stopPropagation()
-
+ handleRetry = () => {
const {
transaction: { txParams: { to } = {} },
methodData: { name } = {},
@@ -156,6 +154,7 @@ export default class TransactionListItem extends PureComponent {
<TransactionListItemDetails
transaction={transaction}
showRetry={showRetry && methodData.done}
+ onRetry={this.handleRetry}
/>
</div>
)