@continuumdao/ctm-mpc-defi 0.2.4 → 0.2.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/index.js CHANGED
@@ -1335,6 +1335,7 @@ async function buildEvmMultisignBodyUniswapV4SkipPermit2Batch(args) {
1335
1335
  }
1336
1336
  });
1337
1337
  }
1338
+ var UNISWAP_V4_LP_POOL_LOOKUP_HINT = "Pool may not be initialized on this chain. Call ctm_uniswap_v4_list_lp_pools for other presets, pass a custom existingPool.poolReference, or use newPool to initialize a pool.";
1338
1339
 
1339
1340
  // src/protocols/evm/uniswap-v4/liquidityApi.ts
1340
1341
  var LP_HEADERS_BASE = {
@@ -1399,9 +1400,9 @@ async function postUniswapLpApi(args) {
1399
1400
  });
1400
1401
  const text = await res.text();
1401
1402
  if (!res.ok) {
1402
- throw new Error(
1403
- `Uniswap LP POST /${args.path} failed: ${messageFromUniswapHttpResponseBody(text, res.status, res.statusText)}`
1404
- );
1403
+ const base2 = messageFromUniswapHttpResponseBody(text, res.status, res.statusText);
1404
+ const hint = args.path === "create" && args.body.existingPool ? ` ${UNISWAP_V4_LP_POOL_LOOKUP_HINT}` : "";
1405
+ throw new Error(`Uniswap LP POST /${args.path} failed: ${base2}${hint}`);
1405
1406
  }
1406
1407
  return JSON.parse(text);
1407
1408
  }