@orbs-network/twap 1.7.8 → 1.7.9

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.
package/dist/src/lib.d.ts CHANGED
@@ -40,11 +40,7 @@ export declare class TWAPLib {
40
40
  getAllOrders(): Promise<Order[]>;
41
41
  private sendTx;
42
42
  parseOrder(r: any): Order;
43
- getToken(address: string): Promise<{
44
- address: string;
45
- decimals: number;
46
- symbol: string;
47
- }>;
43
+ getToken(address: string): Promise<TokenData>;
48
44
  }
49
45
  export interface Order {
50
46
  id: number;
package/dist/src/lib.js CHANGED
@@ -217,6 +217,8 @@ class TWAPLib {
217
217
  }
218
218
  getToken(address) {
219
219
  return __awaiter(this, void 0, void 0, function* () {
220
+ if ((0, configs_1.isNativeAddress)(address))
221
+ return this.config.wToken;
220
222
  const t = (0, web3_candies_1.erc20)("", address);
221
223
  return { address, decimals: yield t.decimals(), symbol: yield t.methods.symbol().call() };
222
224
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbs-network/twap",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/orbs-network/twap.git"