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

tx-gas-util - set error message when invalidating tx based on tx data but no contract code

This commit is contained in:
kumavis 2018-10-21 01:01:21 -04:00
parent 17a856cfd3
commit 31e5cad1e3

View File

@ -71,7 +71,8 @@ class TxGasUtil {
if (codeIsEmpty) {
// if there's data in the params, but there's no contract code, it's not a valid transaction
if (txParams.data) {
const err = new Error()
const err = new Error('TxGasUtil - Trying to call a function on a non-contract address')
// set error key so ui can display localized error message
err.errorKey = TRANSACTION_NO_CONTRACT_ERROR_KEY
throw err
}