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:
parent
17a856cfd3
commit
31e5cad1e3
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user