@riocrypto/common-server 1.0.1317 → 1.0.1318

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.
@@ -11,14 +11,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getExchangeRates = void 0;
13
13
  const common_1 = require("@riocrypto/common");
14
- const currency_api_client_1 = require("../clients/currency-api-client");
15
14
  const kapstar_client_1 = require("../clients/kapstar-client");
15
+ const polygon_client_1 = require("../clients/polygon-client");
16
16
  const getExchangeRates = (fiat) => __awaiter(void 0, void 0, void 0, function* () {
17
- const currencyAPIClient = yield (0, currency_api_client_1.buildCurrencyAPIClient)();
17
+ const polygonClient = yield (0, polygon_client_1.buildPolygonClient)();
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
- : yield currencyAPIClient.convert(fiat, common_1.Fiat.USD);
21
+ : (yield polygonClient.getExchangeRate(fiat, common_1.Fiat.USD)) * (1 + 2 / 10000);
22
22
  let conversionRateFromUSD = 1 / conversionRateToUSD;
23
23
  let conversionRateToUSDWithMarkups = conversionRateToUSD;
24
24
  let conversionRateFromUSDWithMarkups = conversionRateFromUSD;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1317",
3
+ "version": "1.0.1318",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",