@aurigami/sdk 1.7.5 → 1.7.6-temp

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.5",
2
+ "version": "1.7.6-temp",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -27,13 +27,16 @@ export async function fetchPriceFromCoingeckoAPI(id: string): Promise<BigNumber>
27
27
  export async function fetchPriceFromCoingecko(id: Address): Promise<BigNumber> {
28
28
  switch (id.toLowerCase()) {
29
29
  case networkAddresses.tokens.AURORA:
30
- return fetchPriceFromCoingeckoAPI('aurora-near');
30
+ // return fetchPriceFromCoingeckoAPI('aurora-near');
31
+ return new BigNumber('4.27');
31
32
 
32
33
  case networkAddresses.tokens.TRI:
33
- return fetchPriceFromCoingeckoAPI('trisolaris');
34
+ // return fetchPriceFromCoingeckoAPI('trisolaris');
35
+ return new BigNumber('0.1034');
34
36
 
35
37
  case networkAddresses.tokens.META:
36
- return fetchPriceFromCoingeckoAPI('meta-pool');
38
+ // return fetchPriceFromCoingeckoAPI('meta-pool');
39
+ return new BigNumber('0.01335');
37
40
 
38
41
  default:
39
42
  throw Error(`Unknown token ${id} in fetchPriceFromCoingecko`);
@@ -158,19 +161,6 @@ export async function fetchUnderlyingTokensPrices(provider: providers.Provider):
158
161
  });
159
162
  }
160
163
 
161
- export async function fetchStNEARPrice(): Promise<BigNumber> {
162
- const ratioPromise = axios
163
- .get('https://validators.narwallets.com/metrics_json')
164
- .then((res) => res.data);
165
- const nearPricePromise = fetchPriceFromCoingeckoAPI('near');
166
- const [ratioRes, nearPrice]: [any, BigNumber] = await Promise.all([
167
- ratioPromise,
168
- nearPricePromise,
169
- ]);
170
- const ratio = new BigNumber(ratioRes.st_near_price);
171
- return ratio.multipliedBy(nearPrice);
172
- }
173
-
174
164
  function shouldFetchFromCoingecko(address: string) {
175
165
  address = address.toLowerCase();
176
166
  return (
@@ -189,7 +179,6 @@ async function _fetchPrice(address: Address, provider: providers.Provider): Prom
189
179
  `Address ${address} is not whitelisted for price fetching`
190
180
  );
191
181
 
192
- if (isSameAddress(address, networkAddresses.tokens.stNEAR)) return fetchStNEARPrice();
193
182
  if (shouldFetchFromCoingecko(address)) return fetchPriceFromCoingecko(address);
194
183
 
195
184
  const matchingAuToken = networkAddresses.auTokens.find((auToken) => {