@aurigami/sdk 1.4.5 → 1.4.6
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/sdk.cjs.development.js +15 -7
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +15 -7
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/priceFetcher.ts +1 -1
|
@@ -2461,37 +2461,45 @@ function _fetchPrice() {
|
|
|
2461
2461
|
return _context8.abrupt("return", new BigNumber(0));
|
|
2462
2462
|
|
|
2463
2463
|
case 2:
|
|
2464
|
-
if (!
|
|
2464
|
+
if (!isSameAddress(address, networkAddresses.tokens.stNEAR)) {
|
|
2465
2465
|
_context8.next = 4;
|
|
2466
2466
|
break;
|
|
2467
2467
|
}
|
|
2468
2468
|
|
|
2469
|
-
return _context8.abrupt("return",
|
|
2469
|
+
return _context8.abrupt("return", fetchStNEARPrice());
|
|
2470
2470
|
|
|
2471
2471
|
case 4:
|
|
2472
|
+
if (!shouldFetchFromCoingecko(address)) {
|
|
2473
|
+
_context8.next = 6;
|
|
2474
|
+
break;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
return _context8.abrupt("return", fetchPriceFromCoingecko(address));
|
|
2478
|
+
|
|
2479
|
+
case 6:
|
|
2472
2480
|
matchingAuToken = networkAddresses.auTokens.find(function (auToken) {
|
|
2473
2481
|
return isSameAddress(auToken.underlying, address);
|
|
2474
2482
|
});
|
|
2475
2483
|
|
|
2476
2484
|
if (!(matchingAuToken !== undefined)) {
|
|
2477
|
-
_context8.next =
|
|
2485
|
+
_context8.next = 11;
|
|
2478
2486
|
break;
|
|
2479
2487
|
}
|
|
2480
2488
|
|
|
2481
2489
|
return _context8.abrupt("return", fetchPriceFromOracle(matchingAuToken.address, getDecimal(address), provider));
|
|
2482
2490
|
|
|
2483
|
-
case
|
|
2491
|
+
case 11:
|
|
2484
2492
|
if (!isSameAddress(address, networkAddresses.tokens.AURPLY)) {
|
|
2485
|
-
_context8.next =
|
|
2493
|
+
_context8.next = 15;
|
|
2486
2494
|
break;
|
|
2487
2495
|
}
|
|
2488
2496
|
|
|
2489
2497
|
return _context8.abrupt("return", fetchLPPrice(address, provider));
|
|
2490
2498
|
|
|
2491
|
-
case
|
|
2499
|
+
case 15:
|
|
2492
2500
|
return _context8.abrupt("return", fetchPriceFromCoingecko(address));
|
|
2493
2501
|
|
|
2494
|
-
case
|
|
2502
|
+
case 16:
|
|
2495
2503
|
case "end":
|
|
2496
2504
|
return _context8.stop();
|
|
2497
2505
|
}
|