1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Use tOrKey for actionKey in ConfirmTransactionBase

This commit is contained in:
Whymarrh Whitby 2019-04-30 23:46:50 -02:30
parent 12cfe8e543
commit e6b9b5c5a9

View File

@ -18,6 +18,7 @@ import AdvancedGasInputs from '../../components/app/gas-customization/advanced-g
export default class ConfirmTransactionBase extends Component {
static contextTypes = {
t: PropTypes.func,
tOrKey: PropTypes.func.isRequired,
metricsEvent: PropTypes.func,
}
@ -546,7 +547,8 @@ export default class ConfirmTransactionBase extends Component {
toName={toName}
toAddress={toAddress}
showEdit={onEdit && !isTxReprice}
action={this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')}
// In the event that the key is falsy (and inherently invalid), use a fallback string
action={this.context.tOrKey(actionKey) || getMethodName(name) || this.context.t('contractInteraction')}
title={title}
titleComponent={this.renderTitleComponent()}
subtitle={subtitle}