@orbs-network/twap 1.18.3 → 1.18.5
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.js +8 -2
- package/package.json +3 -2
package/dist/src/lib.js
CHANGED
|
@@ -249,8 +249,14 @@ class TWAPLib {
|
|
|
249
249
|
return r.srcUsd.toNumber();
|
|
250
250
|
}
|
|
251
251
|
catch (e) {
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
try {
|
|
253
|
+
const r = yield odos_1.Odos.findRoute(this.config.chainId, token, this.config.nativeToken, (0, bignumber_js_1.default)(10).pow(token.decimals));
|
|
254
|
+
return r.srcUsd.toNumber();
|
|
255
|
+
}
|
|
256
|
+
catch (e) {
|
|
257
|
+
const r = yield openocean_1.OpenOcean.findRoute(this.config.chainId, token, this.config.nativeToken, (0, bignumber_js_1.default)(10).pow(token.decimals));
|
|
258
|
+
return r.srcUsd.toNumber();
|
|
259
|
+
}
|
|
254
260
|
}
|
|
255
261
|
});
|
|
256
262
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbs-network/twap",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/orbs-network/twap.git"
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"test:arb": "NETWORK=ARB hardhat test",
|
|
35
35
|
"test:bsc": "NETWORK=BSC hardhat test",
|
|
36
36
|
"test:glmr": "NETWORK=GLMR hardhat test",
|
|
37
|
-
"test:base": "NETWORK=BASE hardhat test"
|
|
37
|
+
"test:base": "NETWORK=BASE hardhat test",
|
|
38
|
+
"test:linea": "NETWORK=LINEA hardhat test"
|
|
38
39
|
},
|
|
39
40
|
"prettier": {
|
|
40
41
|
"printWidth": 120
|