@aurigami/sdk 1.4.0 → 1.4.1
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 +8 -4
- 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 +8 -4
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -0
- package/src/priceFetcher.ts +10 -6
|
@@ -976,6 +976,7 @@ var networkAddresses = {
|
|
|
976
976
|
USDC: /*#__PURE__*/'0xb12bfca5a55806aaf64e99521918a4bf0fc40802'.toLowerCase(),
|
|
977
977
|
WNEAR: /*#__PURE__*/'0xC42C30aC6Cc15faC9bD938618BcaA1a1FaE8501d'.toLowerCase(),
|
|
978
978
|
TRI: /*#__PURE__*/'0xFa94348467f64D5A457F75F8bc40495D33c65aBB'.toLowerCase(),
|
|
979
|
+
META: /*#__PURE__*/'0xc21ff01229e982d7c8b8691163b0a3cb8f357453'.toLocaleLowerCase(),
|
|
979
980
|
AURPLY: /*#__PURE__*/dummyAddress.toLowerCase()
|
|
980
981
|
}
|
|
981
982
|
};
|
|
@@ -2223,7 +2224,7 @@ function _fetchPriceFromCoingecko() {
|
|
|
2223
2224
|
switch (_context2.prev = _context2.next) {
|
|
2224
2225
|
case 0:
|
|
2225
2226
|
_context2.t0 = id.toLowerCase();
|
|
2226
|
-
_context2.next = _context2.t0 === networkAddresses.tokens.AURORA ? 3 : _context2.t0 === networkAddresses.tokens.TRI ? 4 : 5;
|
|
2227
|
+
_context2.next = _context2.t0 === networkAddresses.tokens.AURORA ? 3 : _context2.t0 === networkAddresses.tokens.TRI ? 4 : _context2.t0 === networkAddresses.tokens.META ? 5 : 6;
|
|
2227
2228
|
break;
|
|
2228
2229
|
|
|
2229
2230
|
case 3:
|
|
@@ -2233,9 +2234,12 @@ function _fetchPriceFromCoingecko() {
|
|
|
2233
2234
|
return _context2.abrupt("return", fetchPriceFromCoingeckoAPI('trisolaris'));
|
|
2234
2235
|
|
|
2235
2236
|
case 5:
|
|
2236
|
-
|
|
2237
|
+
return _context2.abrupt("return", fetchPriceFromCoingeckoAPI('meta-pool'));
|
|
2237
2238
|
|
|
2238
2239
|
case 6:
|
|
2240
|
+
throw Error("Unknown token " + id + " in fetchPriceFromCoingecko");
|
|
2241
|
+
|
|
2242
|
+
case 7:
|
|
2239
2243
|
case "end":
|
|
2240
2244
|
return _context2.stop();
|
|
2241
2245
|
}
|
|
@@ -2449,7 +2453,7 @@ function _fetchStNEARPrice() {
|
|
|
2449
2453
|
|
|
2450
2454
|
function shouldFetchFromCoingecko(address) {
|
|
2451
2455
|
address = address.toLowerCase();
|
|
2452
|
-
return address == networkAddresses.tokens.AURORA || address == networkAddresses.tokens.TRI;
|
|
2456
|
+
return address == networkAddresses.tokens.AURORA || address == networkAddresses.tokens.TRI || address == networkAddresses.tokens.META;
|
|
2453
2457
|
}
|
|
2454
2458
|
|
|
2455
2459
|
function fetchPrice(_x11, _x12) {
|
|
@@ -2491,7 +2495,7 @@ function _fetchPrice() {
|
|
|
2491
2495
|
return _context8.abrupt("return", fetchPriceFromOracle(matchingAuToken.address, getDecimal(address), provider));
|
|
2492
2496
|
|
|
2493
2497
|
case 9:
|
|
2494
|
-
if (!isSameAddress(address, networkAddresses.tokens.
|
|
2498
|
+
if (!isSameAddress(address, networkAddresses.tokens.AURPLY)) {
|
|
2495
2499
|
_context8.next = 13;
|
|
2496
2500
|
break;
|
|
2497
2501
|
}
|