File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
2020### Security
2121
22+ ## @meteora-ag/dlmm [ 1.5.3] - PR #213
23+
24+ ### Fixed
25+
26+ - fix ` processPosition ` to use decimal.js calculate ` positionXAmount `
27+
2228## @meteora-ag/dlmm [ 1.5.2] - PR #209
2329
2430### Fixed
Original file line number Diff line number Diff line change 11{
22 "name" : " @meteora-ag/dlmm" ,
3- "version" : " 1.5.2 " ,
3+ "version" : " 1.5.3 " ,
44 "description" : " " ,
55 "main" : " ./dist/index.js" ,
66 "module" : " ./dist/index.mjs" ,
Original file line number Diff line number Diff line change @@ -6169,11 +6169,15 @@ export class DLMM {
61696169
61706170 const positionXAmount = binSupply . eq ( ZERO )
61716171 ? ZERO
6172- : posShare . mul ( bin . xAmount ) . div ( binSupply ) ;
6172+ : new Decimal ( posShare . toString ( ) )
6173+ . mul ( new Decimal ( bin . xAmount . toString ( ) ) )
6174+ . div ( new Decimal ( binSupply . toString ( ) ) ) ;
61736175
61746176 const positionYAmount = binSupply . eq ( ZERO )
61756177 ? ZERO
6176- : posShare . mul ( bin . yAmount ) . div ( binSupply ) ;
6178+ : new Decimal ( posShare . toString ( ) )
6179+ . mul ( new Decimal ( bin . yAmount . toString ( ) ) )
6180+ . div ( new Decimal ( binSupply . toString ( ) ) ) ;
61776181
61786182 totalXAmount = totalXAmount . add ( new Decimal ( positionXAmount . toString ( ) ) ) ;
61796183 totalYAmount = totalYAmount . add ( new Decimal ( positionYAmount . toString ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments