Skip to content

Commit

Permalink
fix: token decimals in matching estimates (#356)
Browse files Browse the repository at this point in the history
* fix: token decimals in matching estimates

fixes issue with matching estimates in rounds where a non-18-decimal token is used

* fix: token decimals bug

* fix: token decimals bug

* fix: token decimals bug
  • Loading branch information
vacekj authored Nov 21, 2023
1 parent 44d6382 commit c8aa2c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/calculator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export default class Calculator {

const voteAmountInRoundToken = convertFiatToToken({
fiatAmount: voteAmountInUsd,
tokenDecimals: 18,
tokenDecimals: conversionRateRoundToken.decimals,
tokenPrice: conversionRateRoundToken.price,
tokenPriceDecimals: 8,
});
Expand Down

0 comments on commit c8aa2c4

Please sign in to comment.