Skip to content

Commit 4f56790

Browse files
authored
signer/fourbytes: fix up error messages (#19877)
1 parent 78ab411 commit 4f56790

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

signer/fourbyte/validation.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ func (db *Database) ValidateTransaction(selector *string, tx *core.SendTxArgs) (
5353
if len(data) == 0 {
5454
// Prevent sending ether into black hole (show stopper)
5555
if tx.Value.ToInt().Cmp(big.NewInt(0)) > 0 {
56-
return nil, errors.New("tx will create contract with value but empty code")
56+
return nil, errors.New("transaction will create a contract with value but empty code")
5757
}
5858
// No value submitted at least, critically Warn, but don't blow up
59-
messages.Crit("Transaction will create contract with empty code")
59+
messages.Crit("Transaction will create a contract with empty code")
6060
} else if len(data) < 40 { // arbitrary heuristic limit
61-
messages.Warn(fmt.Sprintf("Transaction will create contract, but payload is suspiciously small (%d bytes)", len(data)))
61+
messages.Warn(fmt.Sprintf("Transaction will create a contract, but the payload is suspiciously small (%d bytes)", len(data)))
6262
}
6363
// Method selector should be nil for contract creation
6464
if selector != nil {
65-
messages.Warn("Transaction will create contract, but method selector supplied, indicating intent to call a method")
65+
messages.Warn("Transaction will create a contract, but method selector supplied, indicating an intent to call a method")
6666
}
6767
return messages, nil
6868
}

0 commit comments

Comments
 (0)