@scallop-io/sui-scallop-sdk 0.46.34 → 0.46.36

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/README.md CHANGED
@@ -40,6 +40,8 @@ This SDK is used to interact with [sui-lending-protocol](https://github.com/scal
40
40
  ```
41
41
  - Create an instance:
42
42
 
43
+ > **Note**: Currently, this SDK only supports the mainnet network. When you use the testnet network, it will give errors because there is no address package ID for the testnet.
44
+
43
45
  ```typescript
44
46
  // Create an instance quickly through the`Scallop` class to construct other models.
45
47
  const scallopSDK = new Scallop({
package/dist/index.js CHANGED
@@ -5650,16 +5650,18 @@ var generateReferralQuickMethod = ({
5650
5650
  const rewardCoin = txBlock.claimReferralRevenue(veScaKey, coinName);
5651
5651
  objToTransfer.push(rewardCoin);
5652
5652
  } else {
5653
- const coins = await builder.suiKit.suiInteractor.selectCoins(
5654
- sender,
5655
- Infinity,
5656
- builder.utils.parseCoinType(coinName)
5657
- );
5658
5653
  const rewardCoin = txBlock.claimReferralRevenue(veScaKey, coinName);
5659
- if (coins.length > 0) {
5654
+ try {
5655
+ const coins = await builder.suiKit.suiInteractor.selectCoins(
5656
+ sender,
5657
+ Infinity,
5658
+ builder.utils.parseCoinType(coinName)
5659
+ );
5660
5660
  txBlock.mergeCoins(rewardCoin, coins);
5661
+ } catch (e) {
5662
+ } finally {
5663
+ objToTransfer.push(rewardCoin);
5661
5664
  }
5662
- objToTransfer.push(rewardCoin);
5663
5665
  }
5664
5666
  }
5665
5667
  if (objToTransfer.length > 0) {