@tradeport/sui-trading-sdk 0.1.75 → 0.1.76
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/CHANGELOG.md +6 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/methods/placeCollectionBids/addPlaceCollectionBidTxs.ts +10 -0
- package/src/methods/placeCollectionBids/placeCollectionBids.ts +0 -11
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -4246,6 +4246,10 @@ async function addOriginByteCollectionBidTx({
|
|
|
4246
4246
|
sharedObjects,
|
|
4247
4247
|
bidderKiosk
|
|
4248
4248
|
}) {
|
|
4249
|
+
const collectionFloorPrice = await getCollectionFloorPrice(collectionId);
|
|
4250
|
+
if (collectionFloorPrice && collectionFloorPrice > 0 && Number(bidAmount) > Number(collectionFloorPrice)) {
|
|
4251
|
+
throw new Error("Bid amount must be less than the collection floor price");
|
|
4252
|
+
}
|
|
4249
4253
|
const { orderbook } = sharedObjects;
|
|
4250
4254
|
const marketFeePrice = getMarketFeePrice({ price: bidAmount, collectionId });
|
|
4251
4255
|
const [coin] = splitCoins({ tx, amounts: [tx.pure.u64(bidAmount + marketFeePrice)] });
|
|
@@ -4293,10 +4297,6 @@ var placeCollectionBids = async ({ collections, walletAddress }, context) => {
|
|
|
4293
4297
|
const collectionsForTracking = [];
|
|
4294
4298
|
const tx = new import_transactions16.Transaction();
|
|
4295
4299
|
for (const collection of res.collections) {
|
|
4296
|
-
const collectionFloorPrice = await getCollectionFloorPrice(collection?.id);
|
|
4297
|
-
if (collectionFloorPrice && collectionFloorPrice > 0 && Number(collections?.find((c) => c.id === collection?.id)?.bidAmountInMist) > Number(collectionFloorPrice)) {
|
|
4298
|
-
throw new Error("Bid amount must be less than the collection floor price");
|
|
4299
|
-
}
|
|
4300
4300
|
const nftType = collection.id === "07231735-96de-4710-8e11-52c61a482578" ? "0x034c162f6b594cb5a1805264dd01ca5d80ce3eca6522e6ee37fd9ebfb9d3ddca::factory::PrimeMachin" : getNftTypeFromNft(collection?.nfts?.[0]);
|
|
4301
4301
|
const sharedObjects = await getSharedObjects(nftType);
|
|
4302
4302
|
const txData = {
|