Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mercurial-finance/farming-sdk

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mercurial-finance/farming-sdk - npm Package Compare versions

Comparing version 1.0.16-abc1234.0 to 1.0.16-abc1234.1

29

dist/index.js

@@ -58,3 +58,2 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __defProp = Object.defineProperty;

var _nodefetch = require('node-fetch'); var _nodefetch2 = _interopRequireDefault(_nodefetch);

@@ -1527,24 +1526,2 @@

}
// async getClaimableReward(owner: PublicKey) {
// if (!this.eventParser) throw "EventParser not found";
// const claimMethodBuilder = await this.claimMethodBuilder(owner);
// const claimTransaction = await claimMethodBuilder.transaction();
// if (!claimTransaction) return;
// const blockhash = (
// await this.program.provider.connection.getLatestBlockhash("finalized")
// ).blockhash;
// const claimTx = new Transaction({
// recentBlockhash: blockhash,
// feePayer: SIMULATION_USER,
// });
// claimTransaction && claimTx.add(claimTransaction);
// const tx = await this.program.provider.connection.simulateTransaction(
// claimTx
// );
// const simulatedReward = (await parseLogs(
// this.eventParser,
// tx?.value?.logs ?? []
// )) as { amountA: BN; amountB: BN };
// return simulatedReward;
// }
static getClaimableRewards(owner, farmMints, connection) {

@@ -1589,4 +1566,6 @@ return __async(this, null, function* () {

const { a, b } = rewardPerToken(poolState, lastTimeRewardApplicable);
const rewardA = userState ? userState.balanceStaked.mul(a.sub(userState.rewardAPerTokenComplete)).div(new (0, _anchor.BN)(1e9)).add(userState.rewardAPerTokenPending) : new (0, _anchor.BN)(0);
const rewardB = userState ? userState.balanceStaked.mul(b.sub(userState.rewardBPerTokenComplete)).div(new (0, _anchor.BN)(1e9)).add(userState.rewardBPerTokenPending) : new (0, _anchor.BN)(0);
if (!userState || !poolState)
return accValue;
const rewardA = userState.balanceStaked.mul(a.sub(userState.rewardAPerTokenComplete)).div(new (0, _anchor.BN)(1e9)).add(userState.rewardAPerTokenPending);
const rewardB = userState.balanceStaked.mul(b.sub(userState.rewardBPerTokenComplete)).div(new (0, _anchor.BN)(1e9)).add(userState.rewardBPerTokenPending);
accValue.set(farmMint, {

@@ -1593,0 +1572,0 @@ rewardA,

2

package.json
{
"name": "@mercurial-finance/farming-sdk",
"version": "1.0.16-abc1234.0",
"version": "1.0.16-abc1234.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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc