flipmeme-sdk 1.3.85 → 1.3.87

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
@@ -34741,6 +34741,10 @@ var EthereumConnector = class {
34741
34741
  return __async(this, null, function* () {
34742
34742
  var _a;
34743
34743
  let endPrice = collection.endPrice;
34744
+ let [isAvailable, errorMsg] = this.isPriceAvailable(endPrice);
34745
+ if (!isAvailable) {
34746
+ throw new Error(`Price ${endPrice} Error: ${errorMsg}`);
34747
+ }
34744
34748
  const startPrice = new import_decimal2.default(endPrice).div(17).toFixed(0);
34745
34749
  console.log(`Creating collection with startPrice: ${startPrice} and endPrice: ${endPrice}`);
34746
34750
  let tx = yield this.factory.createCollection(
@@ -35144,13 +35148,13 @@ var EthereumConnector = class {
35144
35148
  const minPriceForEth = new import_decimal2.default(2).mul(new import_decimal2.default(10).pow(16)).toString();
35145
35149
  const maxPriceForEth = new import_decimal2.default(10).pow(18).toString();
35146
35150
  if (priceInDecimal.lessThan(minPriceForEth) || priceInDecimal.greaterThan(maxPriceForEth)) {
35147
- return [false, `Price ${price} is out of the allowed range [${minPriceForEth}, ${maxPriceForEth}].`];
35151
+ return [false, `Price ${import_ethers62.ethers.utils.formatEther(price)} is out of the allowed range [${import_ethers62.ethers.utils.formatEther(minPriceForEth)} ETH, ${import_ethers62.ethers.utils.formatEther(maxPriceForEth)} ETH].`];
35148
35152
  }
35149
35153
  } else if (this.config.chainId === 8453 /* Base */ || this.config.chainId === 84532 /* BaseSepolia */) {
35150
35154
  const minPriceForEth = new import_decimal2.default(10).pow(16).toString();
35151
35155
  const maxPriceForEth = new import_decimal2.default(5).mul(new import_decimal2.default(10).pow(16)).toString();
35152
35156
  if (priceInDecimal.lessThan(minPriceForEth) || priceInDecimal.greaterThan(maxPriceForEth)) {
35153
- return [false, `Price ${price} is out of the allowed range [${minPriceForEth}, ${maxPriceForEth}].`];
35157
+ return [false, `Price ${import_ethers62.ethers.utils.formatEther(price)} is out of the allowed range [${import_ethers62.ethers.utils.formatEther(minPriceForEth)} ETH, ${import_ethers62.ethers.utils.formatEther(maxPriceForEth)} ETH].`];
35154
35158
  }
35155
35159
  }
35156
35160
  return [true, ""];