@aurigami/sdk 1.19.4 → 1.19.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.esm.js CHANGED
@@ -1892,25 +1892,31 @@ function _fetchPrice2() {
1892
1892
  while (1) switch (_context14.prev = _context14.next) {
1893
1893
  case 0:
1894
1894
  assert(PRICE_WHITELISTED.has(address.toLocaleLowerCase()), "Address " + address + " is not whitelisted for price fetching");
1895
- if (!shouldFetchFromKyberSwap(address)) {
1895
+ if (!(address.toLowerCase() == networkAddresses.tokens.META)) {
1896
1896
  _context14.next = 3;
1897
1897
  break;
1898
1898
  }
1899
+ return _context14.abrupt("return", fetchPriceFromDefiLlamaAndCoingecko(address));
1900
+ case 3:
1901
+ if (!shouldFetchFromKyberSwap(address)) {
1902
+ _context14.next = 5;
1903
+ break;
1904
+ }
1899
1905
  return _context14.abrupt("return", fetchPriceFromKyberSwap(address, provider)["catch"](function (e) {
1900
1906
  return fetchPriceFromDefiLlamaAndCoingecko(address);
1901
1907
  }));
1902
- case 3:
1908
+ case 5:
1903
1909
  matchingAuToken = networkAddresses.auTokens.find(function (auToken) {
1904
1910
  return isSameAddress(auToken.underlying, address);
1905
1911
  });
1906
1912
  if (!(matchingAuToken !== undefined)) {
1907
- _context14.next = 8;
1913
+ _context14.next = 10;
1908
1914
  break;
1909
1915
  }
1910
1916
  return _context14.abrupt("return", fetchPriceFromOracle(matchingAuToken.address, getDecimal(address), provider));
1911
- case 8:
1917
+ case 10:
1912
1918
  throw Error("Unable to fetch price for " + address);
1913
- case 9:
1919
+ case 11:
1914
1920
  case "end":
1915
1921
  return _context14.stop();
1916
1922
  }
@@ -2929,7 +2935,7 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
2929
2935
  }
2930
2936
  _context13.t0 = helpers;
2931
2937
  _context13.next = 9;
2932
- return fetchValuation(TokenAmount.fromAddressAndAmount(networkAddresses.tokens.META, '750000', false), this._networkConnection.provider);
2938
+ return fetchValuation(TokenAmount.fromAddressAndAmount(networkAddresses.tokens.META, '500000', false), this._networkConnection.provider);
2933
2939
  case 9:
2934
2940
  _context13.t1 = _context13.sent;
2935
2941
  _context13.t2 = underlyingPrice.multipliedBy(totalDeposited.formattedAmount());