@riocrypto/common-server 1.0.1319 → 1.0.1321

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.
@@ -22,9 +22,7 @@ class PolygonClient {
22
22
  }
23
23
  getExchangeRate(from, to) {
24
24
  return __awaiter(this, void 0, void 0, function* () {
25
- console.log(`Getting https://api.polygon.io/v1/last_quote/currencies/${from}/${to}?apiKey=${this.apiKey}`);
26
25
  const { data } = yield axios_1.default.get(`https://api.polygon.io/v1/last_quote/currencies/${from}/${to}?apiKey=${this.apiKey}`);
27
- console.log(data.last);
28
26
  return data.last.bid;
29
27
  });
30
28
  }
@@ -18,7 +18,7 @@ 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
- : (yield polygonClient.getExchangeRate(fiat, common_1.Fiat.USD)) * (1 + 2 / 10000);
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.1319",
3
+ "version": "1.0.1321",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",