@mercurial-finance/farming-sdk
Advanced tools
Comparing version 1.0.11-abc12345.0 to 1.0.11-abc12345.1
@@ -1042,15 +1042,10 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __defProp = Object.defineProperty; | ||
); | ||
console.log( | ||
"\u{1F680} ~ file: farm.ts:213 ~ PoolFarmImpl ~ poolFarmsImpl:", | ||
poolFarmsImpl.map(({ address }) => address.toBase58()) | ||
); | ||
const preInstructions = []; | ||
const claimAllIxs = yield Promise.all( | ||
poolFarmsImpl.map((poolFarmImpl) => __async(this, null, function* () { | ||
return (yield poolFarmImpl.claimMethodBuilder(owner)).instruction(); | ||
const claimMethod = yield poolFarmImpl.claimMethodBuilder(owner); | ||
preInstructions.push(...claimMethod.preInstructions); | ||
return yield claimMethod.method.instruction(); | ||
})) | ||
); | ||
console.log( | ||
"\u{1F680} ~ file: farm.ts:223 ~ PoolFarmImpl ~ claimAllIxs:", | ||
claimAllIxs | ||
); | ||
const chunkedClaimAllIx = chunks(claimAllIxs, MAX_CLAIM_ALL_ALLOWED); | ||
@@ -1063,3 +1058,3 @@ return Promise.all( | ||
"finalized" | ||
))).add(...claimAllIx).add(_web3js.ComputeBudgetProgram.setComputeUnitLimit({ units: 14e5 })); | ||
))).add(...preInstructions).add(...claimAllIx).add(_web3js.ComputeBudgetProgram.setComputeUnitLimit({ units: 14e5 })); | ||
})) | ||
@@ -1189,13 +1184,16 @@ ); | ||
userRewardBIx && preInstructions.push(userRewardBIx); | ||
return this.program.methods.claim().accounts({ | ||
owner, | ||
pool: this.address, | ||
rewardAAccount: userRewardAATA, | ||
rewardBAccount: isDual ? userRewardBATA : userRewardAATA, | ||
rewardAVault: this.poolState.rewardAVault, | ||
rewardBVault: this.poolState.rewardBVault, | ||
stakingVault: this.poolState.stakingVault, | ||
tokenProgram: _spltoken.TOKEN_PROGRAM_ID, | ||
user: userPda | ||
}).preInstructions(preInstructions); | ||
return { | ||
method: this.program.methods.claim().accounts({ | ||
owner, | ||
pool: this.address, | ||
rewardAAccount: userRewardAATA, | ||
rewardBAccount: isDual ? userRewardBATA : userRewardAATA, | ||
rewardAVault: this.poolState.rewardAVault, | ||
rewardBVault: this.poolState.rewardBVault, | ||
stakingVault: this.poolState.stakingVault, | ||
tokenProgram: _spltoken.TOKEN_PROGRAM_ID, | ||
user: userPda | ||
}).preInstructions(preInstructions), | ||
preInstructions | ||
}; | ||
}); | ||
@@ -1205,3 +1203,3 @@ } | ||
return __async(this, null, function* () { | ||
const claimTx = yield (yield this.claimMethodBuilder(owner)).transaction(); | ||
const claimTx = yield (yield this.claimMethodBuilder(owner)).method.transaction(); | ||
return new (0, _web3js.Transaction)(__spreadValues({ | ||
@@ -1220,3 +1218,3 @@ feePayer: owner | ||
const claimMethodBuilder = yield this.claimMethodBuilder(owner); | ||
const claimTransaction = yield claimMethodBuilder.transaction(); | ||
const claimTransaction = yield claimMethodBuilder.method.transaction(); | ||
if (!claimTransaction) | ||
@@ -1223,0 +1221,0 @@ return; |
{ | ||
"name": "@mercurial-finance/farming-sdk", | ||
"version": "1.0.11-abc12345.0", | ||
"version": "1.0.11-abc12345.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
242420
3226