@scallop-io/sui-scallop-sdk 0.46.54 → 0.46.55
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 +1 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/builders/loyaltyProgramBuilder.ts +2 -6
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
2
|
-
import {
|
|
2
|
+
import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
|
|
3
3
|
import { coinIds } from 'src/constants';
|
|
4
4
|
import { ScallopBuilder } from 'src/models';
|
|
5
5
|
import {
|
|
@@ -43,7 +43,6 @@ const generateLoyaltyProgramQuickMethod: GenerateLoyaltyProgramQuickMethod = ({
|
|
|
43
43
|
if (!veScaKey) throw new Error(`No veScaKey found for user ${sender}`);
|
|
44
44
|
|
|
45
45
|
// claim the pending reward
|
|
46
|
-
const toTransferObject: SuiObjectArg[] = [];
|
|
47
46
|
const rewardCoin = txBlock.claimLoyaltyRevenue(veScaKey);
|
|
48
47
|
|
|
49
48
|
// get existing sca coin to merge with
|
|
@@ -53,10 +52,7 @@ const generateLoyaltyProgramQuickMethod: GenerateLoyaltyProgramQuickMethod = ({
|
|
|
53
52
|
coinIds.sca,
|
|
54
53
|
requireSender(txBlock)
|
|
55
54
|
);
|
|
56
|
-
|
|
57
|
-
if (toTransferObject.length > 0) {
|
|
58
|
-
txBlock.transferObjects(toTransferObject, sender);
|
|
59
|
-
}
|
|
55
|
+
txBlock.transferObjects([rewardCoin], sender);
|
|
60
56
|
},
|
|
61
57
|
};
|
|
62
58
|
};
|