mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 11:35:40 +01:00
Add satoshisRounded to Bitcoins (#3904)
This commit is contained in:
parent
6c67e83d3f
commit
d66afe9e43
1 changed files with 5 additions and 0 deletions
|
@ -152,6 +152,11 @@ sealed abstract class Bitcoins extends CurrencyUnit {
|
|||
val sat = underlying * CurrencyUnits.btcToSatoshiScalar
|
||||
Satoshis(sat.toLongExact)
|
||||
}
|
||||
|
||||
def satoshisRounded: Satoshis = {
|
||||
val sat = underlying * CurrencyUnits.btcToSatoshiScalar
|
||||
Satoshis(sat.toLong)
|
||||
}
|
||||
}
|
||||
|
||||
object Bitcoins extends BaseNumbers[Bitcoins] with Bounded[Bitcoins] {
|
||||
|
|
Loading…
Add table
Reference in a new issue