Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix base token weight in pool #468

Merged
merged 1 commit into from
Jun 24, 2022
Merged

fix base token weight in pool #468

merged 1 commit into from
Jun 24, 2022

Conversation

mihaisc
Copy link
Contributor

@mihaisc mihaisc commented Jun 23, 2022

No description provided.

@@ -202,7 +202,7 @@ export function handleSetup(event: LOG_SETUP): void {
pool.baseToken = token.id
pool.baseTokenWeight = weiToDecimal(
event.params.baseTokenWeight.toBigDecimal(),
token.decimals
18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some background on why this is needed? The datatoken is made according to a template (which can change) so it could feasibly have a different number of decimals in future

Copy link
Contributor Author

@mihaisc mihaisc Jun 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weight is hardcoded to 18, it was wrong to use token.decimals . Deploying another pool contract is not as easy , if we do that we will need more refactoring anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok cool, sounds fair enough

@mihaisc mihaisc merged commit 09e7938 into main Jun 24, 2022
@mihaisc mihaisc deleted the fix/tokenWeight branch June 24, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants