mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-31 21:29:22 +00:00
get market price by currency code base e.g. usdt
This commit is contained in:
parent
2c3cd5208b
commit
9c3e405fe0
1 changed files with 1 additions and 1 deletions
|
@ -72,7 +72,7 @@ class CorePriceService {
|
||||||
* @return Price per 1 XMR in the given currency (traditional or crypto)
|
* @return Price per 1 XMR in the given currency (traditional or crypto)
|
||||||
*/
|
*/
|
||||||
public double getMarketPrice(String currencyCode) throws ExecutionException, InterruptedException, TimeoutException, IllegalArgumentException {
|
public double getMarketPrice(String currencyCode) throws ExecutionException, InterruptedException, TimeoutException, IllegalArgumentException {
|
||||||
var marketPrice = priceFeedService.requestAllPrices().get(currencyCode);
|
var marketPrice = priceFeedService.requestAllPrices().get(CurrencyUtil.getCurrencyCodeBase(currencyCode));
|
||||||
if (marketPrice == null) {
|
if (marketPrice == null) {
|
||||||
throw new IllegalArgumentException("Currency not found: " + currencyCode); // message sent to client
|
throw new IllegalArgumentException("Currency not found: " + currencyCode); // message sent to client
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue