@guru-fund/sdk 0.2.2 → 0.2.3

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.
@@ -131,8 +131,10 @@ async function _priceViaDirectStablePool(token, oneToken, poolHelper, stable, st
131
131
  .catch(() => null);
132
132
  if (!route)
133
133
  return null;
134
- return (BigInt(route.data.amountToReceive) * 10n ** 18n) /
135
- Token.unitFor(stableDecimals);
134
+ const amountToReceive = BigInt(route.data.amountToReceive);
135
+ if (amountToReceive === 0n)
136
+ return null;
137
+ return (amountToReceive * 10n ** 18n) / Token.unitFor(stableDecimals);
136
138
  }
137
139
  async function _priceViaV4Pools(token, oneToken, getWethUsd, ctx) {
138
140
  const addresses = getGuruProtocolAddresses(ctx.chainId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guru-fund/sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Guru Protocol SDK — quote + transaction builders for on-chain managed funds.",
5
5
  "license": "MIT",
6
6
  "type": "module",