@morpho-org/blue-sdk 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/maths/MathLib.js +2 -1
- package/package.json +5 -5
package/lib/maths/MathLib.js
CHANGED
|
@@ -157,7 +157,8 @@ class MathLib {
|
|
|
157
157
|
static rateToApy(rate, period) {
|
|
158
158
|
const { unit, duration } = morpho_ts_1.Time.toPeriod(period);
|
|
159
159
|
const factor = morpho_ts_1.Time[unit].from.y(1) / duration;
|
|
160
|
-
return (1 + Number(helpers_1.format.number.of(BigInt(rate), 18))) ** factor -
|
|
160
|
+
return ((1 + Number(helpers_1.format.number.locale("en").of(BigInt(rate), 18))) ** factor -
|
|
161
|
+
1);
|
|
161
162
|
}
|
|
162
163
|
/**
|
|
163
164
|
* Converts an apr to compounded apy
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/blue-sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"author": "Morpho Association <contact@morpho.org>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"keccak256": "^1.0.6"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@morpho-org/morpho-test": "^1.6.
|
|
20
|
-
"@morpho-org/morpho-ts": "^1.6.
|
|
19
|
+
"@morpho-org/morpho-test": "^1.6.1",
|
|
20
|
+
"@morpho-org/morpho-ts": "^1.6.1",
|
|
21
21
|
"@types/jest": "^29.5.12",
|
|
22
22
|
"@types/node": "^22.1.0",
|
|
23
23
|
"jest": "^29.7.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript": "^5.4.5"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@morpho-org/morpho-ts": "^1.6.
|
|
28
|
+
"@morpho-org/morpho-ts": "^1.6.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
],
|
|
50
50
|
"preset": "ts-jest"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "79f26227b66b2ddb0a1732df01f6b218b812a2a2"
|
|
53
53
|
}
|