aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Miller <danjm.com@gmail.com>2019-04-08 22:02:51 +0800
committerDan Miller <danjm.com@gmail.com>2019-04-09 00:01:11 +0800
commitc80b295ccccc5d57a5dfe0ca8cc2d663609b7a26 (patch)
tree187b057bfbc92c0b360d8147e407196eb3737e9d /ui
parent5d948360c06c250dcf7261c8624f792a8c21fbae (diff)
downloadtangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.tar
tangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.tar.gz
tangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.tar.bz2
tangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.tar.lz
tangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.tar.xz
tangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.tar.zst
tangerine-wallet-browser-c80b295ccccc5d57a5dfe0ca8cc2d663609b7a26.zip
Only pass english function names to functionType metric
Diffstat (limited to 'ui')
-rw-r--r--ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js2
-rw-r--r--ui/app/pages/confirm-send-ether/confirm-send-ether.component.js2
-rw-r--r--ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js22
3 files changed, 13 insertions, 13 deletions
diff --git a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js b/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
index 9bc0daab9..c90ccc917 100644
--- a/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
+++ b/ui/app/pages/confirm-deploy-contract/confirm-deploy-contract.component.js
@@ -56,7 +56,7 @@ export default class ConfirmDeployContract extends Component {
render () {
return (
<ConfirmTransactionBase
- action={this.context.t('contractDeployment')}
+ actionKey={'contractDeployment'}
dataComponent={this.renderData()}
/>
)
diff --git a/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js b/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js
index 8daad675e..68280f624 100644
--- a/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js
+++ b/ui/app/pages/confirm-send-ether/confirm-send-ether.component.js
@@ -30,7 +30,7 @@ export default class ConfirmSendEther extends Component {
return (
<ConfirmTransactionBase
- action={this.context.t('confirm')}
+ actionKey={'confirm'}
hideData={hideData}
onEdit={confirmTransactionData => this.handleEdit(confirmTransactionData)}
/>
diff --git a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
index 9e749322f..5cafe91c9 100644
--- a/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
+++ b/ui/app/pages/confirm-transaction-base/confirm-transaction-base.component.js
@@ -64,7 +64,7 @@ export default class ConfirmTransactionBase extends Component {
updateGasAndCalculate: PropTypes.func,
customGas: PropTypes.object,
// Component props
- action: PropTypes.string,
+ actionKey: PropTypes.string,
contentComponent: PropTypes.node,
dataComponent: PropTypes.node,
detailsComponent: PropTypes.node,
@@ -159,7 +159,7 @@ export default class ConfirmTransactionBase extends Component {
}
handleEditGas () {
- const { onEditGas, showCustomizeGasModal, action, txData: { origin }, methodData = {} } = this.props
+ const { onEditGas, showCustomizeGasModal, actionKey, txData: { origin }, methodData = {} } = this.props
this.context.metricsEvent({
eventOpts: {
@@ -169,7 +169,7 @@ export default class ConfirmTransactionBase extends Component {
},
customVariables: {
recipientKnown: null,
- functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'),
+ functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction',
origin,
},
})
@@ -292,7 +292,7 @@ export default class ConfirmTransactionBase extends Component {
}
handleEdit () {
- const { txData, tokenData, tokenProps, onEdit, action, txData: { origin }, methodData = {} } = this.props
+ const { txData, tokenData, tokenProps, onEdit, actionKey, txData: { origin }, methodData = {} } = this.props
this.context.metricsEvent({
eventOpts: {
@@ -302,7 +302,7 @@ export default class ConfirmTransactionBase extends Component {
},
customVariables: {
recipientKnown: null,
- functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'),
+ functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction',
origin,
},
})
@@ -331,7 +331,7 @@ export default class ConfirmTransactionBase extends Component {
handleCancel () {
const { metricsEvent } = this.context
- const { onCancel, txData, cancelTransaction, history, clearConfirmTransaction, action, txData: { origin }, methodData = {} } = this.props
+ const { onCancel, txData, cancelTransaction, history, clearConfirmTransaction, actionKey, txData: { origin }, methodData = {} } = this.props
if (onCancel) {
metricsEvent({
@@ -342,7 +342,7 @@ export default class ConfirmTransactionBase extends Component {
},
customVariables: {
recipientKnown: null,
- functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'),
+ functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction',
origin,
},
})
@@ -358,7 +358,7 @@ export default class ConfirmTransactionBase extends Component {
handleSubmit () {
const { metricsEvent } = this.context
- const { txData: { origin }, sendTransaction, clearConfirmTransaction, txData, history, onSubmit, action, metaMetricsSendCount = 0, setMetaMetricsSendCount, methodData = {} } = this.props
+ const { txData: { origin }, sendTransaction, clearConfirmTransaction, txData, history, onSubmit, actionKey, metaMetricsSendCount = 0, setMetaMetricsSendCount, methodData = {} } = this.props
const { submitting } = this.state
if (submitting) {
@@ -377,7 +377,7 @@ export default class ConfirmTransactionBase extends Component {
},
customVariables: {
recipientKnown: null,
- functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'),
+ functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction',
origin,
},
})
@@ -517,7 +517,7 @@ export default class ConfirmTransactionBase extends Component {
valid: propsValid = true,
errorMessage,
errorKey: propsErrorKey,
- action,
+ actionKey,
title,
subtitle,
hideSubtitle,
@@ -543,7 +543,7 @@ export default class ConfirmTransactionBase extends Component {
toName={toName}
toAddress={toAddress}
showEdit={onEdit && !isTxReprice}
- action={action || getMethodName(name) || this.context.t('contractInteraction')}
+ action={this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')}
title={title}
titleComponent={this.renderTitleComponent()}
subtitle={subtitle}