@magmaprotocol/magma-clmm-sdk 0.5.70 → 0.5.71
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 +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6667,8 +6667,8 @@ var RewarderModule = class {
|
|
|
6667
6667
|
}
|
|
6668
6668
|
const allCoinAsset = await this._sdk.getOwnerCoinAssets(this._sdk.senderAddress, null);
|
|
6669
6669
|
tx = tx || new Transaction6();
|
|
6670
|
-
tx.setGasBudget(1e8);
|
|
6671
6670
|
const coinIdMaps = {};
|
|
6671
|
+
const coinIdMaps2 = {};
|
|
6672
6672
|
params.forEach((item) => {
|
|
6673
6673
|
const coinTypeA = normalizeCoinType(item.coinTypeA);
|
|
6674
6674
|
const coinTypeB = normalizeCoinType(item.coinTypeB);
|
|
@@ -6716,10 +6716,10 @@ var RewarderModule = class {
|
|
|
6716
6716
|
const primaryCoinInputs = [];
|
|
6717
6717
|
item.rewarder_coin_types.forEach((type) => {
|
|
6718
6718
|
const coinType = normalizeCoinType(type);
|
|
6719
|
-
let coinInput =
|
|
6719
|
+
let coinInput = coinIdMaps2[type];
|
|
6720
6720
|
if (coinInput === void 0) {
|
|
6721
6721
|
coinInput = TransactionUtil.buildCoinForAmount(tx, allCoinAsset, BigInt(0), coinType, false, true);
|
|
6722
|
-
|
|
6722
|
+
coinIdMaps2[coinType] = coinInput;
|
|
6723
6723
|
}
|
|
6724
6724
|
primaryCoinInputs.push(coinInput.targetCoin);
|
|
6725
6725
|
});
|
|
@@ -6731,6 +6731,12 @@ var RewarderModule = class {
|
|
|
6731
6731
|
TransactionUtil.buildTransferCoin(this._sdk, tx, value.targetCoin, key, this._sdk.senderAddress);
|
|
6732
6732
|
}
|
|
6733
6733
|
});
|
|
6734
|
+
Object.keys(coinIdMaps2).forEach((key) => {
|
|
6735
|
+
const value = coinIdMaps2[key];
|
|
6736
|
+
if (value.isMintZeroCoin) {
|
|
6737
|
+
TransactionUtil.buildTransferCoin(this._sdk, tx, value.targetCoin, key, this._sdk.senderAddress);
|
|
6738
|
+
}
|
|
6739
|
+
});
|
|
6734
6740
|
return tx;
|
|
6735
6741
|
}
|
|
6736
6742
|
createCollectRewarderPaylod(params, tx, primaryCoinInputs) {
|