zcash-android-wallet-sdk / cash.z.wallet.sdk.ext / java.math.BigDecimal / convertCurrency

convertCurrency

fun BigDecimal.convertCurrency(zecPrice: BigDecimal, isUsd: Boolean): BigDecimal

Convert this value from one currency to the other, based on given price and whether this value is USD. If starting with USD -> End with ZEC. If starting with ZEC -> End with USD.

Parameters

isUSD - whether this value represents USD or not (ZEC)

Return
this BigDecimal value converted from one currency into the other, based on the given price.