diff options
Diffstat (limited to 'ui/app/helpers/transactions.util.js')
-rw-r--r-- | ui/app/helpers/transactions.util.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/app/helpers/transactions.util.js b/ui/app/helpers/transactions.util.js index 8b87bb538..f7d249e63 100644 --- a/ui/app/helpers/transactions.util.js +++ b/ui/app/helpers/transactions.util.js @@ -44,6 +44,12 @@ export function isConfirmDeployContract (txData = {}) { return !txParams.to } +/** + * Returns the action of a transaction as a key to be passed into the translator. + * @param {Object} transaction - txData object + * @param {Object} methodData - Data returned from eth-method-registry + * @returns {string|undefined} + */ export async function getTransactionActionKey (transaction, methodData) { const { txParams: { data, to } = {}, msgParams, type } = transaction @@ -81,7 +87,7 @@ export async function getTransactionActionKey (transaction, methodData) { case TOKEN_METHOD_TRANSFER_FROM: return TRANSFER_FROM_ACTION_KEY default: - return name + return undefined } } else { return SEND_ETHER_ACTION_KEY |