flipmeme-sdk 1.3.7 → 1.3.8
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 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2972,11 +2972,12 @@ var SolanaConnector = class {
|
|
|
2972
2972
|
try {
|
|
2973
2973
|
for (const chunk of tokenChunks) {
|
|
2974
2974
|
let transaction = yield this.setUpInstructions(14e5);
|
|
2975
|
-
index += chunk.length
|
|
2975
|
+
index += chunk.length;
|
|
2976
2976
|
let slippagePrice = this.getPriceOfIndex(
|
|
2977
2977
|
"buy" /* BUY */,
|
|
2978
2978
|
collectionInfo,
|
|
2979
|
-
index
|
|
2979
|
+
index - 1
|
|
2980
|
+
//when buy it calculates price first and control index
|
|
2980
2981
|
).mul(slippage + 0.01).div(100).toFixed(0);
|
|
2981
2982
|
for (const nft of chunk) {
|
|
2982
2983
|
const nftPda2 = nftPda(
|
|
@@ -3040,6 +3041,7 @@ var SolanaConnector = class {
|
|
|
3040
3041
|
"sell" /* SELL */,
|
|
3041
3042
|
collectionInfo,
|
|
3042
3043
|
index
|
|
3044
|
+
//when sell it control index and calculate the price
|
|
3043
3045
|
).mul(slippage - 0.01).div(100).toFixed(0);
|
|
3044
3046
|
console.log("slippage price", slippagePrice);
|
|
3045
3047
|
for (const nft of chunk) {
|
|
@@ -3107,7 +3109,8 @@ var SolanaConnector = class {
|
|
|
3107
3109
|
let slippagePrice = this.getPriceOfIndex(
|
|
3108
3110
|
"buy" /* BUY */,
|
|
3109
3111
|
collectionInfo,
|
|
3110
|
-
index
|
|
3112
|
+
index - 1
|
|
3113
|
+
// when mint calculate price and control index
|
|
3111
3114
|
).mul(slippage + 0.01).div(100).toFixed(0);
|
|
3112
3115
|
for (const nftName of chunks) {
|
|
3113
3116
|
const nftSeedKeypair = import_web34.Keypair.generate();
|