@tradeport/sui-trading-sdk 0.1.39 → 0.1.40

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tradeport/sui-trading-sdk
2
2
 
3
+ ## 0.1.40
4
+
5
+ ### Patch Changes
6
+
7
+ - 96c4a13: Fixed remove collection bid getting correct nft type
8
+
3
9
  ## 0.1.39
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -4066,28 +4066,12 @@ var removeCollectionBid = async ({ bidId }, context) => {
4066
4066
  const bidsForTracking = [];
4067
4067
  const tx = new import_transactions16.Transaction();
4068
4068
  for (const bid of res.bids) {
4069
- let nftType;
4070
- if ([
4071
- "fa58ae52-b18d-4179-a2d4-c2471ede5f14",
4072
- // S-Card
4073
- "ca37bbb2-4398-46cb-b467-8a834d2d2612",
4074
- // S-Card mint ticket
4075
- "c8e19183-3a9e-4312-939f-c63a1416e344",
4076
- // Panzerdogs
4077
- "819eabe2-1565-4c3a-a9f6-1b5fca48e09a"
4078
- // Panzerdog Tanks
4079
- ]?.includes(bid?.collection_id)) {
4080
- const collectionWithOneNftRes = await gqlChainRequest({
4081
- chain: "sui",
4082
- query: fetchCollectionsByIdWithOneNft,
4083
- variables: { collectionIds: [bid?.collection_id] }
4084
- });
4085
- nftType = getNftTypeFromNft(collectionWithOneNftRes?.collections?.[0]?.nfts?.[0]);
4086
- } else if (bid?.collection_id === "07231735-96de-4710-8e11-52c61a482578") {
4087
- nftType = "0x034c162f6b594cb5a1805264dd01ca5d80ce3eca6522e6ee37fd9ebfb9d3ddca::factory::PrimeMachin";
4088
- } else {
4089
- nftType = bid?.contract?.properties?.nft_type;
4090
- }
4069
+ const collectionWithOneNftRes = await gqlChainRequest({
4070
+ chain: "sui",
4071
+ query: fetchCollectionsByIdWithOneNft,
4072
+ variables: { collectionIds: [bid?.collection_id] }
4073
+ });
4074
+ const nftType = bid?.collection_id === "07231735-96de-4710-8e11-52c61a482578" ? "0x034c162f6b594cb5a1805264dd01ca5d80ce3eca6522e6ee37fd9ebfb9d3ddca::factory::PrimeMachin" : getNftTypeFromNft(collectionWithOneNftRes?.collections?.[0]?.nfts?.[0]) || bid?.contract?.properties?.nft_type;
4091
4075
  const sharedObjects = await getSharedObjects(nftType);
4092
4076
  const txData = {
4093
4077
  tx,