Skip to content

Commit 9bdde41

Browse files
committed
Fix rounding of dynamic outstanding amount in getBrokerUserPositions function to ensure accurate loan calculations by using roundDown method with specified loan decimals.
1 parent 63cc85b commit 9bdde41

5 files changed

Lines changed: 17 additions & 3 deletions

File tree

packages/moolah-lending-sdk/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @lista-dao/moolah-lending-sdk
22

3+
## 1.0.7
4+
5+
### Patch Changes
6+
7+
- Fix rounding of dynamic outstanding amount in getBrokerUserPositions function to ensure accurate loan calculations by using roundDown method with specified loan decimals.
8+
- Updated dependencies
9+
- @lista-dao/moolah-sdk-core@1.0.8
10+
311
## 1.0.6
412

513
### Patch Changes

packages/moolah-lending-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lista-dao/moolah-lending-sdk",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"type": "module",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",

packages/moolah-lending-sdk/src/read/broker/getBrokerUserPositions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function getBrokerUserPositions(
8989
},
9090
loanDecimals,
9191
);
92-
dynamicOutstanding = totalRepay;
92+
dynamicOutstanding = totalRepay.roundDown(loanDecimals);
9393
}
9494

9595
// Calculate fixed positions data

packages/moolah-sdk-core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @lista-dao/moolah-sdk-core
22

3+
## 1.0.8
4+
5+
### Patch Changes
6+
7+
- Fix rounding of dynamic outstanding amount in getBrokerUserPositions function to ensure accurate loan calculations by using roundDown method with specified loan decimals.
8+
39
## 1.0.7
410

511
### Patch Changes

packages/moolah-sdk-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lista-dao/moolah-sdk-core",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"type": "module",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",

0 commit comments

Comments
 (0)