Skip to content

Commit 74b2a3a

Browse files
authored
sdk: show protected-asset have zero-borrow-limit (#1603)
* sdk: show protected-asset have zero-borrow-limit * rm unused AssetTier import
1 parent be137d2 commit 74b2a3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/src/math/spotBalance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ export function calculateWithdrawLimit(
631631
borrowLimit = BN.min(borrowLimit, maxBorrowTokens);
632632
}
633633

634-
if (withdrawLimit.eq(ZERO)) {
634+
if (withdrawLimit.eq(ZERO) || isVariant(spotMarket.assetTier, 'protected')) {
635635
borrowLimit = ZERO;
636636
}
637637

0 commit comments

Comments
 (0)