@aurigami/sdk 1.15.0 → 1.15.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/ChangeLog.md +8 -0
- package/dist/sdk.cjs.development.js +1 -1
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +1 -1
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/interactors/misc.ts +5 -5
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.15.
|
|
2
|
+
"version": "1.15.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"typescript": "^4.5.4"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@aurigami/contracts": "3.
|
|
65
|
+
"@aurigami/contracts": "3.16.0",
|
|
66
66
|
"axios": "^0.26.1",
|
|
67
67
|
"bignumber.js": "^9.0.2",
|
|
68
68
|
"cache-decorator": "^0.1.6",
|
package/src/interactors/misc.ts
CHANGED
|
@@ -113,12 +113,12 @@ export class MiscRead extends BlockchainEntityRead {
|
|
|
113
113
|
.div(userMarketDetails[i].underlyingPrice);
|
|
114
114
|
userMarketDetails[i].maxWithdrawableAmount =
|
|
115
115
|
userMarketDetails[i].isCollateral &&
|
|
116
|
-
|
|
116
|
+
maxWithdrawCap.lt(userMarketDetails[i].depositBalance.formattedAmount())
|
|
117
117
|
? new TokenAmount(moneyMarket.underlying, maxWithdrawCap.toFixed(24), false)
|
|
118
118
|
: new TokenAmount(
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
moneyMarket.underlying,
|
|
120
|
+
userMarketDetails[i].depositBalance.rawAmount()
|
|
121
|
+
);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
return {
|
|
@@ -258,7 +258,7 @@ export class MiscRead extends BlockchainEntityRead {
|
|
|
258
258
|
}
|
|
259
259
|
|
|
260
260
|
public async getUtilisation(userAddr: types.Address): Promise<BigNumber> {
|
|
261
|
-
let accountDetail = await this.env.auriInternalLens.
|
|
261
|
+
let accountDetail = await this.env.auriInternalLens.callStatic.getAccountLiquidityAccrueInterest(userAddr);
|
|
262
262
|
let sumBorrow = new BigNumber(accountDetail.sumBorrowPlusEffects.toString());
|
|
263
263
|
let sumCol = new BigNumber(accountDetail.sumCollateral.toString());
|
|
264
264
|
return sumBorrow.dividedBy(sumCol);
|