@tradeport/sui-trading-sdk 0.1.44 → 0.1.46

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.45
4
+
5
+ ### Patch Changes
6
+
7
+ - d7861a1: Fixed Anima labs buys
8
+
3
9
  ## 0.1.44
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var graphqlClient_default = graphqlClient;
31
31
 
32
32
  // src/apiClients/suiClient.ts
33
33
  var import_client = require("@mysten/sui/client");
34
- var rpcUrl = (0, import_client.getFullnodeUrl)("mainnet");
34
+ var rpcUrl = "https://rpc-mainnet.suiscan.xyz";
35
35
  var suiClient = new import_client.SuiClient({ url: rpcUrl });
36
36
  var suiClient_default = suiClient;
37
37
 
@@ -751,7 +751,11 @@ var resolveTransferPolicies = async ({
751
751
  }
752
752
  let policies = transferPolicies.length > 0 ? [
753
753
  {
754
- data: transferPolicies[0],
754
+ data: transferPolicies?.filter(
755
+ (policy) => policy?.rules?.filter(
756
+ (rule) => rule?.includes("royalty_rule") || rule?.includes("kiosk_lock_rule") || rule?.includes("personal_kiosk_rule") || rule?.includes("floor_price_rule")
757
+ )?.length > 0
758
+ )?.[0],
755
759
  transferRequest,
756
760
  isCustom: false
757
761
  }
@@ -836,8 +840,7 @@ var resolveTransferPolicies = async ({
836
840
  });
837
841
  break;
838
842
  default:
839
- console.log(`No resolver for the following rule: ${rule}.`);
840
- break;
843
+ throw new Error(`No resolver for the following rule: ${rule}.`);
841
844
  }
842
845
  }
843
846
  }