mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 19:10:22 +01:00
92971d3c87
* Update eslint-plugin-import version * Convert JS files to use ESM * Update ESLint rules to check imports * Fix test:unit:global command env * Cleanup mock-dev script
19 lines
432 B
JavaScript
19 lines
432 B
JavaScript
import { getSelectedToken, getSendEditingTransactionId, getSendTo } from '../send.selectors.js'
|
|
|
|
export function getTitleKey (state) {
|
|
const isEditing = Boolean(getSendEditingTransactionId(state))
|
|
const isToken = Boolean(getSelectedToken(state))
|
|
|
|
if (!getSendTo(state)) {
|
|
return 'addRecipient'
|
|
}
|
|
|
|
if (isEditing) {
|
|
return 'edit'
|
|
} else if (isToken) {
|
|
return 'sendTokens'
|
|
} else {
|
|
return 'sendETH'
|
|
}
|
|
}
|