Updated on 2026-08-14
This commit is contained in:
parent
6303e0b5af
commit
e2c5c7ec75
4 changed files with 20 additions and 12 deletions
|
|
@ -878,9 +878,8 @@ internal class SwapViewModel @Inject constructor(
|
|||
if (it.key != bestRateEntry.key) {
|
||||
val amount = it.value.toTokenInfo.tokenAmount.value
|
||||
val percentDiff = BigDecimal.ONE.minus(
|
||||
amount.divide(bestRate, RoundingMode.HALF_UP)
|
||||
.multiply(hundredPercent),
|
||||
)
|
||||
amount.divide(bestRate, RoundingMode.HALF_UP),
|
||||
).multiply(hundredPercent)
|
||||
percentDiff.setScale(2, RoundingMode.HALF_UP).toFloat().absoluteValue
|
||||
} else {
|
||||
null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue