bugfix
This commit is contained in:
@@ -163,7 +163,7 @@ contract PartyPool is PartyPoolBase, IPartyPool {
|
||||
|
||||
/// @inheritdoc IPartyPool
|
||||
function mintAmounts(uint256 lpTokenAmount) public view returns (uint256[] memory depositAmounts) {
|
||||
return MINT_IMPL.mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply());
|
||||
return MINT_IMPL.mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply(), cachedUintBalances);
|
||||
}
|
||||
|
||||
/// @notice Proportional mint for existing pool.
|
||||
|
||||
@@ -43,7 +43,7 @@ contract PartyPoolMintImpl is PartyPoolBase {
|
||||
uint256 oldScaled = ABDKMath64x64.mulu(oldTotal, LP_SCALE);
|
||||
|
||||
// Calculate required deposit amounts for the desired LP tokens
|
||||
uint256[] memory depositAmounts = mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply());
|
||||
uint256[] memory depositAmounts = mintAmounts(lpTokenAmount, lmsr.nAssets, totalSupply(), cachedUintBalances);
|
||||
|
||||
// Transfer in all token amounts
|
||||
for (uint i = 0; i < n; ) {
|
||||
@@ -166,7 +166,7 @@ contract PartyPoolMintImpl is PartyPoolBase {
|
||||
emit Burn(payer, receiver, withdrawAmounts, lpAmount);
|
||||
}
|
||||
|
||||
function mintAmounts(uint256 lpTokenAmount, uint256 numAssets, uint256 totalSupply) public view
|
||||
function mintAmounts(uint256 lpTokenAmount, uint256 numAssets, uint256 totalSupply, uint256[] memory cachedUintBalances) public view
|
||||
returns (uint256[] memory depositAmounts) {
|
||||
depositAmounts = new uint256[](numAssets);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user