|
|
@ -64,7 +64,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
updateGasAndCalculate: PropTypes.func, |
|
|
|
updateGasAndCalculate: PropTypes.func, |
|
|
|
customGas: PropTypes.object, |
|
|
|
customGas: PropTypes.object, |
|
|
|
// Component props
|
|
|
|
// Component props
|
|
|
|
action: PropTypes.string, |
|
|
|
actionKey: PropTypes.string, |
|
|
|
contentComponent: PropTypes.node, |
|
|
|
contentComponent: PropTypes.node, |
|
|
|
dataComponent: PropTypes.node, |
|
|
|
dataComponent: PropTypes.node, |
|
|
|
detailsComponent: PropTypes.node, |
|
|
|
detailsComponent: PropTypes.node, |
|
|
@ -159,7 +159,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleEditGas () { |
|
|
|
handleEditGas () { |
|
|
|
const { onEditGas, showCustomizeGasModal, action, txData: { origin }, methodData = {} } = this.props |
|
|
|
const { onEditGas, showCustomizeGasModal, actionKey, txData: { origin }, methodData = {} } = this.props |
|
|
|
|
|
|
|
|
|
|
|
this.context.metricsEvent({ |
|
|
|
this.context.metricsEvent({ |
|
|
|
eventOpts: { |
|
|
|
eventOpts: { |
|
|
@ -169,7 +169,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
}, |
|
|
|
}, |
|
|
|
customVariables: { |
|
|
|
customVariables: { |
|
|
|
recipientKnown: null, |
|
|
|
recipientKnown: null, |
|
|
|
functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'), |
|
|
|
functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction', |
|
|
|
origin, |
|
|
|
origin, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
@ -292,7 +292,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleEdit () { |
|
|
|
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({ |
|
|
|
this.context.metricsEvent({ |
|
|
|
eventOpts: { |
|
|
|
eventOpts: { |
|
|
@ -302,7 +302,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
}, |
|
|
|
}, |
|
|
|
customVariables: { |
|
|
|
customVariables: { |
|
|
|
recipientKnown: null, |
|
|
|
recipientKnown: null, |
|
|
|
functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'), |
|
|
|
functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction', |
|
|
|
origin, |
|
|
|
origin, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
@ -331,7 +331,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
|
|
|
|
|
|
|
|
handleCancel () { |
|
|
|
handleCancel () { |
|
|
|
const { metricsEvent } = this.context |
|
|
|
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) { |
|
|
|
if (onCancel) { |
|
|
|
metricsEvent({ |
|
|
|
metricsEvent({ |
|
|
@ -342,7 +342,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
}, |
|
|
|
}, |
|
|
|
customVariables: { |
|
|
|
customVariables: { |
|
|
|
recipientKnown: null, |
|
|
|
recipientKnown: null, |
|
|
|
functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'), |
|
|
|
functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction', |
|
|
|
origin, |
|
|
|
origin, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
@ -358,7 +358,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
|
|
|
|
|
|
|
|
handleSubmit () { |
|
|
|
handleSubmit () { |
|
|
|
const { metricsEvent } = this.context |
|
|
|
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 |
|
|
|
const { submitting } = this.state |
|
|
|
|
|
|
|
|
|
|
|
if (submitting) { |
|
|
|
if (submitting) { |
|
|
@ -377,7 +377,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
}, |
|
|
|
}, |
|
|
|
customVariables: { |
|
|
|
customVariables: { |
|
|
|
recipientKnown: null, |
|
|
|
recipientKnown: null, |
|
|
|
functionType: action || getMethodName(methodData.name) || this.context.t('contractInteraction'), |
|
|
|
functionType: actionKey || getMethodName(methodData.name) || 'contractInteraction', |
|
|
|
origin, |
|
|
|
origin, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
}) |
|
|
@ -517,7 +517,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
valid: propsValid = true, |
|
|
|
valid: propsValid = true, |
|
|
|
errorMessage, |
|
|
|
errorMessage, |
|
|
|
errorKey: propsErrorKey, |
|
|
|
errorKey: propsErrorKey, |
|
|
|
action, |
|
|
|
actionKey, |
|
|
|
title, |
|
|
|
title, |
|
|
|
subtitle, |
|
|
|
subtitle, |
|
|
|
hideSubtitle, |
|
|
|
hideSubtitle, |
|
|
@ -543,7 +543,7 @@ export default class ConfirmTransactionBase extends Component { |
|
|
|
toName={toName} |
|
|
|
toName={toName} |
|
|
|
toAddress={toAddress} |
|
|
|
toAddress={toAddress} |
|
|
|
showEdit={onEdit && !isTxReprice} |
|
|
|
showEdit={onEdit && !isTxReprice} |
|
|
|
action={action || getMethodName(name) || this.context.t('contractInteraction')} |
|
|
|
action={this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')} |
|
|
|
title={title} |
|
|
|
title={title} |
|
|
|
titleComponent={this.renderTitleComponent()} |
|
|
|
titleComponent={this.renderTitleComponent()} |
|
|
|
subtitle={subtitle} |
|
|
|
subtitle={subtitle} |
|
|
|