Skip to content

Commit

Permalink
tx-signing-js: rollback changes in MapSigmaValidationSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
aslesarenko committed Aug 25, 2023
1 parent 71f4b7e commit ac3c6b8
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ sealed class MapSigmaValidationSettings(private val map: Map[Short, (ValidationR
}

override def equals(obj: Any): Boolean = (this eq obj.asInstanceOf[AnyRef]) || (obj match {
case that: MapSigmaValidationSettings =>
map.size == that.map.size &&
map.iterator.forall { case (id, v) => that.map.get(id).exists(_ == v) }
case that: MapSigmaValidationSettings => map == that.map
case _ => false
})

override def hashCode(): Int = map.toIndexedSeq.sortBy(_._1).hashCode()
override def hashCode(): Int = map.hashCode()
}

0 comments on commit ac3c6b8

Please sign in to comment.