Skip to content

Commit

Permalink
Pass staking pool factory instead of staking pool implementation to S…
Browse files Browse the repository at this point in the history
…takingProduct as constructor arg
  • Loading branch information
shark0der committed Mar 3, 2023
1 parent 0ceb243 commit 46209dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/modules/staking/StakingProducts.sol
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ contract StakingProducts is IStakingProducts, MasterAwareV2, Multicall {
uint allocationUnitsPerNXM
) public returns (uint premium) {

if (msg.sender != StakingPoolLibrary.getAddress(stakingPoolFactory, poolId)) {
revert OnlyStakingPool();
}
if (msg.sender != StakingPoolLibrary.getAddress(stakingPoolFactory, poolId)) {
revert OnlyStakingPool();
}

StakedProduct memory product = _products[poolId][productId];
uint targetPrice = Math.max(product.targetPrice, globalMinPrice);
Expand Down
2 changes: 1 addition & 1 deletion test/fork/migration-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ describe('V2 upgrade', function () {
// SP - StakingProduct.sol
const stakingProductsImpl = await ethers.deployContract('StakingProducts', [
this.coverProxyAddress,
this.stakingPool.address,
this.stakingPoolFactory.address,
]);

const coverTypeAndSalt = BigNumber.from(CoverCreate2Salt).shl(8).add(ContractTypes.Proxy);
Expand Down

0 comments on commit 46209dc

Please sign in to comment.