@aurigami/sdk 0.4.1 → 0.4.2

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.
@@ -2281,7 +2281,7 @@ function _fetchValuation() {
2281
2281
  while (1) {
2282
2282
  switch (_context8.prev = _context8.next) {
2283
2283
  case 0:
2284
- if (!(price === null)) {
2284
+ if (!(price === undefined)) {
2285
2285
  _context8.next = 4;
2286
2286
  break;
2287
2287
  }
@@ -3078,6 +3078,11 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
3078
3078
  rewardBalancesMetadata = values[1];
3079
3079
  lockedAmount = values[2];
3080
3080
  borrowedvaluation = totalBorrowLimit.minus(new BigNumber(accountLiquidity[1].toString()).div(decimalFactor(18)));
3081
+
3082
+ if (borrowedvaluation.lt("0.00001")) {
3083
+ borrowedvaluation = new BigNumber(0);
3084
+ }
3085
+
3081
3086
  bufferedBorrowLimit = totalBorrowLimit.multipliedBy(BORROW_LIMIT_BUFFER);
3082
3087
  minimumBorrowLimitAllowed = borrowedvaluation.div(BORROW_LIMIT_BUFFER);
3083
3088
 
@@ -3108,7 +3113,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
3108
3113
  }
3109
3114
  });
3110
3115
 
3111
- case 36:
3116
+ case 37:
3112
3117
  case "end":
3113
3118
  return _context2.stop();
3114
3119
  }
@@ -3359,7 +3364,8 @@ var dummyUserMarketDetails = {
3359
3364
  borrowBalance: dummyZeroTokenAmount,
3360
3365
  isCollateral: true,
3361
3366
  maxWithdrawableAmount: dummyTokenAmount,
3362
- collateralRatio: 0.5
3367
+ collateralRatio: 0.5,
3368
+ underlyingPrice: "1"
3363
3369
  };
3364
3370
 
3365
3371
  exports.AURORA_CHAINID = AURORA_CHAINID;