Skip to content

Commit

Permalink
more hasOwnProperty cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanio committed Aug 7, 2021
1 parent 5974b6d commit 1af4adc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export default class Common extends EventEmitter {
let value = null
for (const hfChanges of HARDFORK_CHANGES) {
// EIP-referencing HF file (e.g. berlin.json)
if (hfChanges[1].hasOwnProperty('eips')) { // eslint-disable-line
if ('eips' in hfChanges[1]) {
const hfEIPs = hfChanges[1]['eips']
for (const eip of hfEIPs) {
const valueEIP = this.paramByEIP(topic, name, eip)
Expand Down Expand Up @@ -943,7 +943,7 @@ export default class Common extends EventEmitter {

let value
for (const hfChanges of HARDFORK_CHANGES) {
if (hfChanges[1].hasOwnProperty('consensus')) { // eslint-disable-line
if ('consensus' in hfChanges[1]) {
value = hfChanges[1]['consensus']['type']
}
if (hfChanges[0] === hardfork) break
Expand All @@ -968,7 +968,7 @@ export default class Common extends EventEmitter {

let value
for (const hfChanges of HARDFORK_CHANGES) {
if ('consensus' in hfChanges[1]) { // eslint-disable-line
if ('consensus' in hfChanges[1]) {
value = hfChanges[1]['consensus']['algorithm']
}
if (hfChanges[0] === hardfork) break
Expand Down Expand Up @@ -998,7 +998,7 @@ export default class Common extends EventEmitter {

let value
for (const hfChanges of HARDFORK_CHANGES) {
if ('consensus' in hfChanges[1]) { // eslint-disable-line
if ('consensus' in hfChanges[1]) {
// The config parameter is named after the respective consensus algorithm
value = hfChanges[1]['consensus'][hfChanges[1]['consensus']['algorithm']]
}
Expand Down

0 comments on commit 1af4adc

Please sign in to comment.