Skip to content

Commit

Permalink
Token approval change in yieldFarming
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-01k committed Sep 13, 2023
1 parent 4fd2683 commit 1bdaafa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/yield/StakingModalComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,20 @@ const StakingModalComponent = ({ onClose, InnerComponentProps, toastObject }) =>


let tx;
const uintMax = bn(2).pow(bn(256)).sub(1);
// const uintMax = bn(2).pow(bn(256)).sub(1);
const fees = ethers.utils.parseUnits(depositAmount.toString(), 18);

if (title === 'Uni-V2') {
const tokencontractinstance = new ethers.Contract(addresses.uniV2LPToken, abis.uniV2LpToken, signer);
tx = tokencontractinstance.approve(
addresses.stakingV2,
uintMax
fees
);
} else {
const tokencontractinstance = new ethers.Contract(addresses.pushToken, abis.uniV2LpToken, signer);
tx = tokencontractinstance.approve(
addresses.pushCoreV2,
uintMax
fees
)
}

Expand Down

0 comments on commit 1bdaafa

Please sign in to comment.