@aurigami/sdk 1.19.3 → 1.19.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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.3",
2
+ "version": "1.19.5",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -297,6 +297,9 @@ async function _fetchPrice(address: Address, provider: providers.Provider): Prom
297
297
  PRICE_WHITELISTED.has(address.toLocaleLowerCase()),
298
298
  `Address ${address} is not whitelisted for price fetching`
299
299
  );
300
+ if (address.toLowerCase() == networkAddresses.tokens.META) {
301
+ return fetchPriceFromDefiLlamaAndCoingecko(address);
302
+ }
300
303
  if (shouldFetchFromKyberSwap(address)) {
301
304
  return fetchPriceFromKyberSwap(address, provider).catch((e) => {
302
305
  return fetchPriceFromDefiLlamaAndCoingecko(address);
@@ -28,8 +28,10 @@ export class StakingRead extends BlockchainEntityRead {
28
28
  .getPoolInfo(consts.PLYWNEAR_POOL_ID)
29
29
  .then((res) => {
30
30
  const endedTime = res.endTime;
31
- // If the pool has ended, return 0 reward per second
32
- if (endedTime < Date.now() / 1000) {
31
+ const startTime = res.startTime;
32
+ const now = Date.now() / 1000;
33
+ // If the pool has ended or not started, return 0 reward per second
34
+ if (endedTime < now || startTime > now) {
33
35
  return {
34
36
  stakedLiquidity: res.totalStake,
35
37
  rewardPerSeconds: res.rewardPerSeconds.map((_) => BN.from(0)),