Merge pull request #201 from blockworks-foundation/fix-close-borrow-string

fix NaN in closeBorrowString
This commit is contained in:
tjshipe 2022-03-22 08:58:39 -04:00 committed by GitHub
commit c7eb72f160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ export default function AdvancedTradeForm({
const closeBorrowString =
percentToClose(baseSize, roundedBorrows) > 100
? t('close-open-long', {
size: (+baseSize - roundedDeposits).toFixed(sizeDecimalCount),
size: (+baseSize - roundedBorrows).toFixed(sizeDecimalCount),
symbol: marketConfig.baseSymbol,
})
: `${percentToClose(baseSize, roundedBorrows).toFixed(0)}% ${t(