MCPcopy
hub / github.com/bisq-network/bisq / valueOf

Method valueOf

core/src/main/java/bisq/core/monetary/Price.java:71–77  ·  view source on GitHub ↗

Parse the Bitcoin Price given a currencyCode and inputValue. @param currencyCode The currency code to parse, e.g "USD" or "LTC". @param value The value to parse. @return The parsed Price.

(String currencyCode, long value)

Source from the content-addressed store, hash-verified

69 * @return The parsed Price.
70 */
71 public static Price valueOf(String currencyCode, long value) {
72 if (CurrencyUtil.isFiatCurrency(currencyCode)) {
73 return new Price(Fiat.valueOf(currencyCode, value));
74 } else {
75 return new Price(Altcoin.valueOf(currencyCode, value));
76 }
77 }
78
79 public Volume getVolumeByAmount(Coin amount) {
80 if (monetary instanceof Fiat)

Callers 15

testGetBsqInUsdMethod · 0.95
toStringMethod · 0.95
getBsqInUsdMethod · 0.95
testValueOfMethod · 0.95
testGetAdjustedAmountMethod · 0.95
getPriceMethod · 0.95
getPriceMethod · 0.95
createAndPlaceOfferMethod · 0.95

Calls 2

isFiatCurrencyMethod · 0.95
valueOfMethod · 0.95

Tested by 15

testGetBsqInUsdMethod · 0.76
testValueOfMethod · 0.76
testGetAdjustedAmountMethod · 0.76
generateBlocksMethod · 0.36
clientMethod · 0.36
calcPriceAsStringMethod · 0.36
bsqBalanceModelMethod · 0.36
testAliceSendBTCToBobMethod · 0.36
ApiTestConfigMethod · 0.36
invalidCoinsProviderMethod · 0.36