@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.js
CHANGED
|
@@ -6887,8 +6887,8 @@ var RewarderModule = class {
|
|
|
6887
6887
|
}
|
|
6888
6888
|
const allCoinAsset = await this._sdk.getOwnerCoinAssets(this._sdk.senderAddress, null);
|
|
6889
6889
|
tx = tx || new import_transactions6.Transaction();
|
|
6890
|
-
tx.setGasBudget(1e8);
|
|
6891
6890
|
const coinIdMaps = {};
|
|
6891
|
+
const coinIdMaps2 = {};
|
|
6892
6892
|
params.forEach((item) => {
|
|
6893
6893
|
const coinTypeA = normalizeCoinType(item.coinTypeA);
|
|
6894
6894
|
const coinTypeB = normalizeCoinType(item.coinTypeB);
|
|
@@ -6936,10 +6936,10 @@ var RewarderModule = class {
|
|
|
6936
6936
|
const primaryCoinInputs = [];
|
|
6937
6937
|
item.rewarder_coin_types.forEach((type) => {
|
|
6938
6938
|
const coinType = normalizeCoinType(type);
|
|
6939
|
-
let coinInput =
|
|
6939
|
+
let coinInput = coinIdMaps2[type];
|
|
6940
6940
|
if (coinInput === void 0) {
|
|
6941
6941
|
coinInput = TransactionUtil.buildCoinForAmount(tx, allCoinAsset, BigInt(0), coinType, false, true);
|
|
6942
|
-
|
|
6942
|
+
coinIdMaps2[coinType] = coinInput;
|
|
6943
6943
|
}
|
|
6944
6944
|
primaryCoinInputs.push(coinInput.targetCoin);
|
|
6945
6945
|
});
|
|
@@ -6951,6 +6951,12 @@ var RewarderModule = class {
|
|
|
6951
6951
|
TransactionUtil.buildTransferCoin(this._sdk, tx, value.targetCoin, key, this._sdk.senderAddress);
|
|
6952
6952
|
}
|
|
6953
6953
|
});
|
|
6954
|
+
Object.keys(coinIdMaps2).forEach((key) => {
|
|
6955
|
+
const value = coinIdMaps2[key];
|
|
6956
|
+
if (value.isMintZeroCoin) {
|
|
6957
|
+
TransactionUtil.buildTransferCoin(this._sdk, tx, value.targetCoin, key, this._sdk.senderAddress);
|
|
6958
|
+
}
|
|
6959
|
+
});
|
|
6954
6960
|
return tx;
|
|
6955
6961
|
}
|
|
6956
6962
|
createCollectRewarderPaylod(params, tx, primaryCoinInputs) {
|