@riocrypto/common-server 1.0.1321 → 1.0.1323
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,8 +18,10 @@ const getExchangeRates = (fiat) => __awaiter(void 0, void 0, void 0, function* (
|
|
|
18
18
|
const kapstarClient = yield (0, kapstar_client_1.buildKapstarClient)();
|
|
19
19
|
const conversionRateToUSD = fiat === common_1.Fiat.BRL
|
|
20
20
|
? yield kapstarClient.getBRLExchangeRateUSD()
|
|
21
|
-
:
|
|
22
|
-
let conversionRateFromUSD =
|
|
21
|
+
: yield polygonClient.getExchangeRate(fiat, common_1.Fiat.USD);
|
|
22
|
+
let conversionRateFromUSD = fiat === common_1.Fiat.BRL
|
|
23
|
+
? 1 / conversionRateToUSD
|
|
24
|
+
: yield polygonClient.getExchangeRate(common_1.Fiat.USD, fiat);
|
|
23
25
|
let conversionRateToUSDWithMarkups = conversionRateToUSD;
|
|
24
26
|
let conversionRateFromUSDWithMarkups = conversionRateFromUSD;
|
|
25
27
|
// Time based markups
|