From 96ee9ce664afbd13aacb2bdff158e6bccf353c15 Mon Sep 17 00:00:00 2001 From: Tyler Shipe Date: Wed, 14 Apr 2021 14:40:28 -0400 Subject: [PATCH] fix margin balance borrows typo --- @types/types.tsx | 2 +- components/MarginBalances.tsx | 2 +- hooks/useWallet.tsx | 2 +- package.json | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/@types/types.tsx b/@types/types.tsx index 11566bed..c052bdfc 100644 --- a/@types/types.tsx +++ b/@types/types.tsx @@ -216,5 +216,5 @@ export interface WalletAdapter { signAllTransactions: (transaction: Transaction[]) => Promise connect: () => any disconnect: () => any - on(event: string, fn: () => void): this + on(event: string, fn: () => void): this } diff --git a/components/MarginBalances.tsx b/components/MarginBalances.tsx index ab977447..dd72059f 100644 --- a/components/MarginBalances.tsx +++ b/components/MarginBalances.tsx @@ -95,7 +95,7 @@ export default function MarginStats() { {selectedMarginAccount ? selectedMarginAccount - .getUiDeposit(selectedMangoGroup, i) + .getUiBorrow(selectedMangoGroup, i) .toFixed(tokenPrecision[name]) : (0).toFixed(tokenPrecision[name])} diff --git a/hooks/useWallet.tsx b/hooks/useWallet.tsx index aaa63a31..ad5033bc 100644 --- a/hooks/useWallet.tsx +++ b/hooks/useWallet.tsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo } from 'react' +import { useEffect } from 'react' import Wallet from '@project-serum/sol-wallet-adapter' import useLocalStorageState from './useLocalStorageState' import useMangoStore, { INITIAL_STATE } from '../stores/useMangoStore' diff --git a/package.json b/package.json index 830578bc..02ea6a94 100644 --- a/package.json +++ b/package.json @@ -9,13 +9,13 @@ "start": "next start", "type-check": "tsc --pretty --noEmit", "format": "prettier --write .", - "lint": "eslint . --ext ts --ext tsx --ext js", + "lint": "eslint . --ext ts --ext tsx --ext js --quiet", "test": "jest", "test-all": "yarn lint && yarn type-check && yarn test" }, "husky": { "hooks": { - "pre-commit": "", + "pre-commit": "yarn format", "pre-push": "" } },