Skip to content

Commit

Permalink
Fix crash on validator setup flow
Browse files Browse the repository at this point in the history
The crash was caused by missing Serializable marker on SimpleFraction.
  • Loading branch information
Radiokot committed Apr 23, 2024
1 parent 0edad07 commit 675a561
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.concordium.wallet.data.model

import java.io.Serializable
import java.math.BigInteger
import java.math.MathContext

/**
* A fraction defined as 2 integers:
Expand All @@ -10,13 +10,8 @@ import java.math.MathContext
* –
* D
* ```
*
* @see toBigDecimal
*/
data class SimpleFraction(
class SimpleFraction(
val numerator: BigInteger,
val denominator: BigInteger,
) {
fun toBigDecimal() =
numerator.toBigDecimal().divide(denominator.toBigDecimal(), MathContext.UNLIMITED)
}
): Serializable

0 comments on commit 675a561

Please sign in to comment.