All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wavesplatform.state.VolumeAndFee.scala Maven / Gradle / Ivy

The newest version!
package com.wavesplatform.state

case class VolumeAndFee(volume: Long, fee: Long) {
  def combineE(that: VolumeAndFee): Either[String, VolumeAndFee] =
    for {
      volume <- safeSum(this.volume, that.volume, "Order volume")
      fee    <- safeSum(this.fee, that.fee, "Order fee")
    } yield VolumeAndFee(volume, fee)
}

object VolumeAndFee {
  val empty: VolumeAndFee = VolumeAndFee(0, 0)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy