fix: increase median

This commit is contained in:
bartosz-lipinski 2021-09-27 15:06:03 -05:00
parent 9890f95138
commit cf5cdd1818
1 changed files with 2 additions and 1 deletions

View File

@ -361,10 +361,11 @@ const Home = (props: HomeProps) => {
let currentAmount = (
state.state.currentMedian || state.state.data.priceRangeStart
).toNumber() / LAMPORTS_PER_SOL;
let adjusted = (currentAmount * 1.4) - (currentAmount * 1.4) % (state.state.data.tickSize.toNumber() / LAMPORTS_PER_SOL);
setContributed(
getPhase(state, undefined) === Phase.Phase1 ?
Math.min(currentAmount * 1.4, maxAmount) :
Math.min(adjusted, maxAmount) :
currentAmount,
);
} catch (e) {