@scallop-io/sui-scallop-sdk 0.46.34 → 0.46.35
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 +8 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/builders/referralBuilder.ts +9 -9
package/package.json
CHANGED
|
@@ -109,18 +109,18 @@ const generateReferralQuickMethod: GenerateReferralQuickMethod = ({
|
|
|
109
109
|
const rewardCoin = txBlock.claimReferralRevenue(veScaKey, coinName);
|
|
110
110
|
objToTransfer.push(rewardCoin);
|
|
111
111
|
} else {
|
|
112
|
-
// get the matching user coin if exists
|
|
113
|
-
const coins = await builder.suiKit.suiInteractor.selectCoins(
|
|
114
|
-
sender,
|
|
115
|
-
Infinity,
|
|
116
|
-
builder.utils.parseCoinType(coinName)
|
|
117
|
-
);
|
|
118
|
-
|
|
119
112
|
const rewardCoin = txBlock.claimReferralRevenue(veScaKey, coinName);
|
|
120
|
-
|
|
113
|
+
try {
|
|
114
|
+
// get the matching user coin if exists
|
|
115
|
+
const coins = await builder.suiKit.suiInteractor.selectCoins(
|
|
116
|
+
sender,
|
|
117
|
+
Infinity,
|
|
118
|
+
builder.utils.parseCoinType(coinName)
|
|
119
|
+
);
|
|
121
120
|
txBlock.mergeCoins(rewardCoin, coins);
|
|
121
|
+
} finally {
|
|
122
|
+
objToTransfer.push(rewardCoin);
|
|
122
123
|
}
|
|
123
|
-
objToTransfer.push(rewardCoin);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
if (objToTransfer.length > 0) {
|