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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -34687,6 +34687,10 @@ var EthereumConnector = class {
|
|
|
34687
34687
|
return __async(this, null, function* () {
|
|
34688
34688
|
var _a;
|
|
34689
34689
|
let endPrice = collection.endPrice;
|
|
34690
|
+
let [isAvailable, errorMsg] = this.isPriceAvailable(endPrice);
|
|
34691
|
+
if (!isAvailable) {
|
|
34692
|
+
throw new Error(`Price ${endPrice} Error: ${errorMsg}`);
|
|
34693
|
+
}
|
|
34690
34694
|
const startPrice = new Decimal2(endPrice).div(17).toFixed(0);
|
|
34691
34695
|
console.log(`Creating collection with startPrice: ${startPrice} and endPrice: ${endPrice}`);
|
|
34692
34696
|
let tx = yield this.factory.createCollection(
|
|
@@ -35090,13 +35094,13 @@ var EthereumConnector = class {
|
|
|
35090
35094
|
const minPriceForEth = new Decimal2(2).mul(new Decimal2(10).pow(16)).toString();
|
|
35091
35095
|
const maxPriceForEth = new Decimal2(10).pow(18).toString();
|
|
35092
35096
|
if (priceInDecimal.lessThan(minPriceForEth) || priceInDecimal.greaterThan(maxPriceForEth)) {
|
|
35093
|
-
return [false, `Price ${price} is out of the allowed range [${minPriceForEth}, ${maxPriceForEth}].`];
|
|
35097
|
+
return [false, `Price ${ethers2.utils.formatEther(price)} is out of the allowed range [${ethers2.utils.formatEther(minPriceForEth)} ETH, ${ethers2.utils.formatEther(maxPriceForEth)} ETH].`];
|
|
35094
35098
|
}
|
|
35095
35099
|
} else if (this.config.chainId === 8453 /* Base */ || this.config.chainId === 84532 /* BaseSepolia */) {
|
|
35096
35100
|
const minPriceForEth = new Decimal2(10).pow(16).toString();
|
|
35097
35101
|
const maxPriceForEth = new Decimal2(5).mul(new Decimal2(10).pow(16)).toString();
|
|
35098
35102
|
if (priceInDecimal.lessThan(minPriceForEth) || priceInDecimal.greaterThan(maxPriceForEth)) {
|
|
35099
|
-
return [false, `Price ${price} is out of the allowed range [${minPriceForEth}, ${maxPriceForEth}].`];
|
|
35103
|
+
return [false, `Price ${ethers2.utils.formatEther(price)} is out of the allowed range [${ethers2.utils.formatEther(minPriceForEth)} ETH, ${ethers2.utils.formatEther(maxPriceForEth)} ETH].`];
|
|
35100
35104
|
}
|
|
35101
35105
|
}
|
|
35102
35106
|
return [true, ""];
|