@orbs-network/twap 1.10.11 → 1.10.12

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.
@@ -8,6 +8,5 @@ export declare namespace Odos {
8
8
  data: string;
9
9
  path: string[];
10
10
  }
11
- function priceUsd(chainId: number, token: TokenData): Promise<BN>;
12
11
  function findRoute(chainId: number, src: TokenData, dst: TokenData, amountIn: BN.Value, exchangeAdapter?: string, onlyDex?: OdosOnlyDex): Promise<Route>;
13
12
  }
package/dist/src/odos.js CHANGED
@@ -11,18 +11,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Odos = void 0;
13
13
  const web3_candies_1 = require("@defi.org/web3-candies");
14
- const configs_1 = require("./configs");
15
14
  var Odos;
16
15
  (function (Odos) {
17
16
  const URL = "https://api.odos.xyz";
18
- function priceUsd(chainId, token) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- token = (0, web3_candies_1.isNativeAddress)(token.address) ? (0, configs_1.chainConfig)(chainId).wToken : token;
21
- const r = yield findRoute(chainId, token, (0, configs_1.chainConfig)(chainId).nativeToken, (0, web3_candies_1.BN)(10).pow(token.decimals));
22
- return r.srcUsd;
23
- });
24
- }
25
- Odos.priceUsd = priceUsd;
26
17
  function findRoute(chainId, src, dst, amountIn, exchangeAdapter = web3_candies_1.zeroAddress, onlyDex) {
27
18
  return __awaiter(this, void 0, void 0, function* () {
28
19
  const response = yield fetch(`${URL}/sor/quote`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbs-network/twap",
3
- "version": "1.10.11",
3
+ "version": "1.10.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/orbs-network/twap.git"